/*
 * This file was generated automatically by ExtUtils::ParseXS version 3.44 from the
 * contents of CFITSIO.xs. Do not edit this file, edit CFITSIO.xs instead.
 *
 *    ANY CHANGES MADE HERE WILL BE LOST!
 *
 */

#line 1 "CFITSIO.xs"
#ifdef __cplusplus
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#ifdef __cplusplus
}
#endif

#include "fitsio.h"
#include "util.h"

/* use the C std lib malloc/free */
#ifdef malloc
#undef malloc
#endif
#ifdef free
#undef free
#endif

static int
not_here(s)
char *s;
{
    croak("%s not implemented on this architecture", s);
    return -1;
}

static double
constant(name, arg)
char *name;
int arg;
{
    errno = 0;
    switch (*name) {
    case 'A':
	if (strEQ(name, "ANGLE_TOO_BIG"))
#ifdef ANGLE_TOO_BIG
	    return ANGLE_TOO_BIG;
#else
	    goto not_there;
#endif
	if (strEQ(name, "ANY_HDU"))
#ifdef ANY_HDU
	    return ANY_HDU;
#else
	    goto not_there;
#endif
	if (strEQ(name, "ARRAY_TOO_BIG"))
#ifdef ARRAY_TOO_BIG
	    return ARRAY_TOO_BIG;
#else
	    goto not_there;
#endif
	if (strEQ(name, "ASCII_TBL"))
#ifdef ASCII_TBL
	    return ASCII_TBL;
#else
	    goto not_there;
#endif
	break;
    case 'B':
	if (strEQ(name, "BAD_ATABLE_FORMAT"))
#ifdef BAD_ATABLE_FORMAT
	    return BAD_ATABLE_FORMAT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_BITPIX"))
#ifdef BAD_BITPIX
	    return BAD_BITPIX;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_BTABLE_FORMAT"))
#ifdef BAD_BTABLE_FORMAT
	    return BAD_BTABLE_FORMAT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_C2D"))
#ifdef BAD_C2D
	    return BAD_C2D;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_C2F"))
#ifdef BAD_C2F
	    return BAD_C2F;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_C2I"))
#ifdef BAD_C2I
	    return BAD_C2I;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_COL_NUM"))
#ifdef BAD_COL_NUM
	    return BAD_COL_NUM;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_DATATYPE"))
#ifdef BAD_DATATYPE
	    return BAD_DATATYPE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_DATA_FILL"))
#ifdef BAD_DATA_FILL
	    return BAD_DATA_FILL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_DATE"))
#ifdef BAD_DATE
	    return BAD_DATE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_DECIM"))
#ifdef BAD_DECIM
	    return BAD_DECIM;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_DIMEN"))
#ifdef BAD_DIMEN
	    return BAD_DIMEN;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_DOUBLEKEY"))
#ifdef BAD_DOUBLEKEY
	    return BAD_DOUBLEKEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_ELEM_NUM"))
#ifdef BAD_ELEM_NUM
	    return BAD_ELEM_NUM;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_F2C"))
#ifdef BAD_F2C
	    return BAD_F2C;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_FILEPTR"))
#ifdef BAD_FILEPTR
	    return BAD_FILEPTR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_FLOATKEY"))
#ifdef BAD_FLOATKEY
	    return BAD_FLOATKEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_GCOUNT"))
#ifdef BAD_GCOUNT
	    return BAD_GCOUNT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_GROUP_ID"))
#ifdef BAD_GROUP_ID
	    return BAD_GROUP_ID;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_HDU_NUM"))
#ifdef BAD_HDU_NUM
	    return BAD_HDU_NUM;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_HEADER_FILL"))
#ifdef BAD_HEADER_FILL
	    return BAD_HEADER_FILL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_I2C"))
#ifdef BAD_I2C
	    return BAD_I2C;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_INTKEY"))
#ifdef BAD_INTKEY
	    return BAD_INTKEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_KEYCHAR"))
#ifdef BAD_KEYCHAR
	    return BAD_KEYCHAR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_LOGICALKEY"))
#ifdef BAD_LOGICALKEY
	    return BAD_LOGICALKEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_NAXES"))
#ifdef BAD_NAXES
	    return BAD_NAXES;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_NAXIS"))
#ifdef BAD_NAXIS
	    return BAD_NAXIS;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_OPTION"))
#ifdef BAD_OPTION
	    return BAD_OPTION;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_ORDER"))
#ifdef BAD_ORDER
	    return BAD_ORDER;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_PCOUNT"))
#ifdef BAD_PCOUNT
	    return BAD_PCOUNT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_PIX_NUM"))
#ifdef BAD_PIX_NUM
	    return BAD_PIX_NUM;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_ROW_NUM"))
#ifdef BAD_ROW_NUM
	    return BAD_ROW_NUM;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_ROW_WIDTH"))
#ifdef BAD_ROW_WIDTH
	    return BAD_ROW_WIDTH;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_SIMPLE"))
#ifdef BAD_SIMPLE
	    return BAD_SIMPLE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_TBCOL"))
#ifdef BAD_TBCOL
	    return BAD_TBCOL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_TDIM"))
#ifdef BAD_TDIM
	    return BAD_TDIM;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_TFIELDS"))
#ifdef BAD_TFIELDS
	    return BAD_TFIELDS;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_TFORM"))
#ifdef BAD_TFORM
	    return BAD_TFORM;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_TFORM_DTYPE"))
#ifdef BAD_TFORM_DTYPE
	    return BAD_TFORM_DTYPE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_URL_PREFIX"))
#ifdef BAD_URL_PREFIX
	    return BAD_URL_PREFIX;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_WCS_PROJ"))
#ifdef BAD_WCS_PROJ
	    return BAD_WCS_PROJ;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BAD_WCS_VAL"))
#ifdef BAD_WCS_VAL
	    return BAD_WCS_VAL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BINARY_TBL"))
#ifdef BINARY_TBL
	    return BINARY_TBL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "BYTE_IMG"))
#ifdef BYTE_IMG
	    return BYTE_IMG;
#else
	    goto not_there;
#endif
	break;
    case 'C':
	if (strEQ(name, "CASEINSEN"))
#ifdef CASEINSEN
	    return CASEINSEN;
#else
	    goto not_there;
#endif
	if (strEQ(name, "CASESEN"))
#ifdef CASESEN
	    return CASESEN;
#else
	    goto not_there;
#endif
	if (strEQ(name, "CFITSIO_MAJOR"))
#ifdef CFITSIO_MAJOR
	    return CFITSIO_MAJOR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "CFITSIO_MINOR"))
#ifdef CFITSIO_MINOR
	    return CFITSIO_MINOR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "COL_NOT_FOUND"))
#ifdef COL_NOT_FOUND
	    return COL_NOT_FOUND;
#else
	    goto not_there;
#endif
	if (strEQ(name, "COL_NOT_UNIQUE"))
#ifdef COL_NOT_UNIQUE
	    return COL_NOT_UNIQUE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "COL_TOO_WIDE"))
#ifdef COL_TOO_WIDE
	    return COL_TOO_WIDE;
#else
	    goto not_there;
#endif
	break;
    case 'D':
	if (strEQ(name, "DOUBLENULLVALUE"))
#ifdef DOUBLENULLVALUE
	    return DOUBLENULLVALUE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "DOUBLE_IMG"))
#ifdef DOUBLE_IMG
	    return DOUBLE_IMG;
#else
	    goto not_there;
#endif
	if (strEQ(name, "DRIVER_INIT_FAILED"))
#ifdef DRIVER_INIT_FAILED
	    return DRIVER_INIT_FAILED;
#else
	    goto not_there;
#endif
	break;
    case 'E':
	if (strEQ(name, "END_JUNK"))
#ifdef END_JUNK
	    return END_JUNK;
#else
	    goto not_there;
#endif
	if (strEQ(name, "END_OF_FILE"))
#ifdef END_OF_FILE
	    return END_OF_FILE;
#else
	    goto not_there;
#endif
	break;
    case 'F':
	if (strEQ(name, "FALSE"))
#ifdef FALSE
	    return FALSE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "FILE_NOT_CLOSED"))
#ifdef FILE_NOT_CLOSED
	    return FILE_NOT_CLOSED;
#else
	    goto not_there;
#endif
	if (strEQ(name, "FILE_NOT_CREATED"))
#ifdef FILE_NOT_CREATED
	    return FILE_NOT_CREATED;
#else
	    goto not_there;
#endif
	if (strEQ(name, "FILE_NOT_OPENED"))
#ifdef FILE_NOT_OPENED
	    return FILE_NOT_OPENED;
#else
	    goto not_there;
#endif
	if (strEQ(name, "FLEN_CARD"))
#ifdef FLEN_CARD
	    return FLEN_CARD;
#else
	    goto not_there;
#endif
	if (strEQ(name, "FLEN_COMMENT"))
#ifdef FLEN_COMMENT
	    return FLEN_COMMENT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "FLEN_ERRMSG"))
#ifdef FLEN_ERRMSG
	    return FLEN_ERRMSG;
#else
	    goto not_there;
#endif
	if (strEQ(name, "FLEN_FILENAME"))
#ifdef FLEN_FILENAME
	    return FLEN_FILENAME;
#else
	    goto not_there;
#endif
	if (strEQ(name, "FLEN_KEYWORD"))
#ifdef FLEN_KEYWORD
	    return FLEN_KEYWORD;
#else
	    goto not_there;
#endif
	if (strEQ(name, "FLEN_STATUS"))
#ifdef FLEN_STATUS
	    return FLEN_STATUS;
#else
	    goto not_there;
#endif
	if (strEQ(name, "FLEN_VALUE"))
#ifdef FLEN_VALUE
	    return FLEN_VALUE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "FLOATNULLVALUE"))
#ifdef FLOATNULLVALUE
	    return FLOATNULLVALUE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "FLOAT_IMG"))
#ifdef FLOAT_IMG
	    return FLOAT_IMG;
#else
	    goto not_there;
#endif
	break;
    case 'G':
	if (strEQ(name, "GROUP_NOT_FOUND"))
#ifdef GROUP_NOT_FOUND
	    return GROUP_NOT_FOUND;
#else
	    goto not_there;
#endif
	if (strEQ(name, "GT_ID_ALL"))
#ifdef GT_ID_ALL
	    return GT_ID_ALL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "GT_ID_ALL_URI"))
#ifdef GT_ID_ALL_URI
	    return GT_ID_ALL_URI;
#else
	    goto not_there;
#endif
	if (strEQ(name, "GT_ID_POS"))
#ifdef GT_ID_POS
	    return GT_ID_POS;
#else
	    goto not_there;
#endif
	if (strEQ(name, "GT_ID_POS_URI"))
#ifdef GT_ID_POS_URI
	    return GT_ID_POS_URI;
#else
	    goto not_there;
#endif
	if (strEQ(name, "GT_ID_REF"))
#ifdef GT_ID_REF
	    return GT_ID_REF;
#else
	    goto not_there;
#endif
	if (strEQ(name, "GT_ID_REF_URI"))
#ifdef GT_ID_REF_URI
	    return GT_ID_REF_URI;
#else
	    goto not_there;
#endif
	if (strEQ(name, "GZIP_1"))
#ifdef GZIP_1
	    return GZIP_1;
#else
	    goto not_there;
#endif
	break;
    case 'H':
	if (strEQ(name, "HDU_ALREADY_MEMBER"))
#ifdef HDU_ALREADY_MEMBER
	    return HDU_ALREADY_MEMBER;
#else
	    goto not_there;
#endif
	if (strEQ(name, "HDU_ALREADY_TRACKED"))
#ifdef HDU_ALREADY_TRACKED
	    return HDU_ALREADY_TRACKED;
#else
	    goto not_there;
#endif
	if (strEQ(name, "HEADER_NOT_EMPTY"))
#ifdef HEADER_NOT_EMPTY
	    return HEADER_NOT_EMPTY;
#else
	    goto not_there;
#endif
	break;
    case 'I':
	if (strEQ(name, "IDENTICAL_POINTERS"))
#ifdef IDENTICAL_POINTERS
	    return IDENTICAL_POINTERS;
#else
	    goto not_there;
#endif
	if (strEQ(name, "IMAGE_HDU"))
#ifdef IMAGE_HDU
	    return IMAGE_HDU;
#else
	    goto not_there;
#endif
	if (strEQ(name, "InputCol"))
#ifdef InputCol
	    return InputCol;
#else
	    goto not_there;
#endif
	if (strEQ(name, "InputOutputCol"))
#ifdef InputOutputCol
	    return InputOutputCol;
#else
	    goto not_there;
#endif
	break;
    case 'J':
	break;
    case 'K':
	if (strEQ(name, "KEY_NO_EXIST"))
#ifdef KEY_NO_EXIST
	    return KEY_NO_EXIST;
#else
	    goto not_there;
#endif
	if (strEQ(name, "KEY_OUT_BOUNDS"))
#ifdef KEY_OUT_BOUNDS
	    return KEY_OUT_BOUNDS;
#else
	    goto not_there;
#endif
	break;
    case 'L':
	if (strEQ(name, "LONG_IMG"))
#ifdef LONG_IMG
	    return LONG_IMG;
#else
	    goto not_there;
#endif
	if (strEQ(name, "LONGLONG_IMG"))
#ifdef LONGLONG_IMG
	    return LONGLONG_IMG;
#else
	    goto not_there;
#endif
	break;
    case 'M':
	if (strEQ(name, "MAXHDU"))
#ifdef MAXHDU
	    return MAXHDU;
#else
	    goto not_there;
#endif
	if (strEQ(name, "MEMBER_NOT_FOUND"))
#ifdef MEMBER_NOT_FOUND
	    return MEMBER_NOT_FOUND;
#else
	    goto not_there;
#endif
	if (strEQ(name, "MEMORY_ALLOCATION"))
#ifdef MEMORY_ALLOCATION
	    return MEMORY_ALLOCATION;
#else
	    goto not_there;
#endif
	break;
    case 'N':
	if (strEQ(name, "NEG_AXIS"))
#ifdef NEG_AXIS
	    return NEG_AXIS;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NEG_BYTES"))
#ifdef NEG_BYTES
	    return NEG_BYTES;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NEG_FILE_POS"))
#ifdef NEG_FILE_POS
	    return NEG_FILE_POS;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NEG_ROWS"))
#ifdef NEG_ROWS
	    return NEG_ROWS;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NEG_WIDTH"))
#ifdef NEG_WIDTH
	    return NEG_WIDTH;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NOT_ASCII_COL"))
#ifdef NOT_ASCII_COL
	    return NOT_ASCII_COL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NOT_ATABLE"))
#ifdef NOT_ATABLE
	    return NOT_ATABLE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NOT_BTABLE"))
#ifdef NOT_BTABLE
	    return NOT_BTABLE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NOT_GROUP_TABLE"))
#ifdef NOT_GROUP_TABLE
	    return NOT_GROUP_TABLE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NOT_IMAGE"))
#ifdef NOT_IMAGE
	    return NOT_IMAGE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NOT_LOGICAL_COL"))
#ifdef NOT_LOGICAL_COL
	    return NOT_LOGICAL_COL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NOT_POS_INT"))
#ifdef NOT_POS_INT
	    return NOT_POS_INT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NOT_TABLE"))
#ifdef NOT_TABLE
	    return NOT_TABLE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NOT_VARI_LEN"))
#ifdef NOT_VARI_LEN
	    return NOT_VARI_LEN;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_BITPIX"))
#ifdef NO_BITPIX
	    return NO_BITPIX;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_END"))
#ifdef NO_END
	    return NO_END;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_GCOUNT"))
#ifdef NO_GCOUNT
	    return NO_GCOUNT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_MATCHING_DRIVER"))
#ifdef NO_MATCHING_DRIVER
	    return NO_MATCHING_DRIVER;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_NAXES"))
#ifdef NO_NAXES
	    return NO_NAXES;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_NAXIS"))
#ifdef NO_NAXIS
	    return NO_NAXIS;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_NULL"))
#ifdef NO_NULL
	    return NO_NULL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_PCOUNT"))
#ifdef NO_PCOUNT
	    return NO_PCOUNT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_QUOTE"))
#ifdef NO_QUOTE
	    return NO_QUOTE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_SIMPLE"))
#ifdef NO_SIMPLE
	    return NO_SIMPLE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_TBCOL"))
#ifdef NO_TBCOL
	    return NO_TBCOL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_TFIELDS"))
#ifdef NO_TFIELDS
	    return NO_TFIELDS;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_TFORM"))
#ifdef NO_TFORM
	    return NO_TFORM;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_WCS_KEY"))
#ifdef NO_WCS_KEY
	    return NO_WCS_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NO_XTENSION"))
#ifdef NO_XTENSION
	    return NO_XTENSION;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NULL_INPUT_PTR"))
#ifdef NULL_INPUT_PTR
	    return NULL_INPUT_PTR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "NUM_OVERFLOW"))
#ifdef NUM_OVERFLOW
	    return NUM_OVERFLOW;
#else
	    goto not_there;
#endif
	break;
    case 'O':
	if (strEQ(name, "OPT_CMT_MBR"))
#ifdef OPT_CMT_MBR
	    return OPT_CMT_MBR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OPT_CMT_MBR_DEL"))
#ifdef OPT_CMT_MBR_DEL
	    return OPT_CMT_MBR_DEL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OPT_GCP_ALL"))
#ifdef OPT_GCP_ALL
	    return OPT_GCP_ALL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OPT_GCP_GPT"))
#ifdef OPT_GCP_GPT
	    return OPT_GCP_GPT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OPT_GCP_MBR"))
#ifdef OPT_GCP_MBR
	    return OPT_GCP_MBR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OPT_MCP_ADD"))
#ifdef OPT_MCP_ADD
	    return OPT_MCP_ADD;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OPT_MCP_MOV"))
#ifdef OPT_MCP_MOV
	    return OPT_MCP_MOV;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OPT_MCP_NADD"))
#ifdef OPT_MCP_NADD
	    return OPT_MCP_NADD;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OPT_MCP_REPL"))
#ifdef OPT_MCP_REPL
	    return OPT_MCP_REPL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OPT_MRG_COPY"))
#ifdef OPT_MRG_COPY
	    return OPT_MRG_COPY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OPT_MRG_MOV"))
#ifdef OPT_MRG_MOV
	    return OPT_MRG_MOV;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OPT_RM_ALL"))
#ifdef OPT_RM_ALL
	    return OPT_RM_ALL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OPT_RM_ENTRY"))
#ifdef OPT_RM_ENTRY
	    return OPT_RM_ENTRY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OPT_RM_GPT"))
#ifdef OPT_RM_GPT
	    return OPT_RM_GPT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OPT_RM_MBR"))
#ifdef OPT_RM_MBR
	    return OPT_RM_MBR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OVERFLOW_ERR"))
#ifdef OVERFLOW_ERR
	    return OVERFLOW_ERR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "OutputCol"))
#ifdef OutputCol
	    return OutputCol;
#else
	    goto not_there;
#endif
	break;
    case 'P':
	if (strEQ(name, "PARSE_BAD_COL"))
#ifdef PARSE_BAD_COL
	    return PARSE_BAD_COL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "PARSE_BAD_OUTPUT"))
#ifdef PARSE_BAD_OUTPUT
	    return PARSE_BAD_OUTPUT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "PARSE_BAD_TYPE"))
#ifdef PARSE_BAD_TYPE
	    return PARSE_BAD_TYPE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "PARSE_LRG_VECTOR"))
#ifdef PARSE_LRG_VECTOR
	    return PARSE_LRG_VECTOR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "PARSE_NO_OUTPUT"))
#ifdef PARSE_NO_OUTPUT
	    return PARSE_NO_OUTPUT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "PARSE_SYNTAX_ERR"))
#ifdef PARSE_SYNTAX_ERR
	    return PARSE_SYNTAX_ERR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "PLIO_1"))
#ifdef PLIO_1
	    return PLIO_1;
#else
	    goto not_there;
#endif
	break;
    case 'Q':
	break;
    case 'R':
	if (strEQ(name, "READONLY"))
#ifdef READONLY
	    return READONLY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "READONLY_FILE"))
#ifdef READONLY_FILE
	    return READONLY_FILE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "READWRITE"))
#ifdef READWRITE
	    return READWRITE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "READ_ERROR"))
#ifdef READ_ERROR
	    return READ_ERROR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "RICE_1"))
#ifdef RICE_1
	    return RICE_1;
#else
	    goto not_there;
#endif
	break;
    case 'S':
	if (strEQ(name, "SAME_FILE"))
#ifdef SAME_FILE
	    return SAME_FILE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "SEEK_ERROR"))
#ifdef SEEK_ERROR
	    return SEEK_ERROR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "SHORT_IMG"))
#ifdef SHORT_IMG
	    return SHORT_IMG;
#else
	    goto not_there;
#endif
	break;
    case 'T':
	if (strEQ(name, "TBIT"))
#ifdef TBIT
	    return TBIT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TBYTE"))
#ifdef TBYTE
	    return TBYTE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TSBYTE"))
#ifdef TSBYTE
	    return TSBYTE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TCOMPLEX"))
#ifdef TCOMPLEX
	    return TCOMPLEX;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TDBLCOMPLEX"))
#ifdef TDBLCOMPLEX
	    return TDBLCOMPLEX;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TDOUBLE"))
#ifdef TDOUBLE
	    return TDOUBLE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TFLOAT"))
#ifdef TFLOAT
	    return TFLOAT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TINT"))
#ifdef TINT
	    return TINT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TLOGICAL"))
#ifdef TLOGICAL
	    return TLOGICAL;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TLONG"))
#ifdef TLONG
	    return TLONG;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TLONGLONG"))
#ifdef TLONGLONG
	    return TLONGLONG;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TOO_MANY_DRIVERS"))
#ifdef TOO_MANY_DRIVERS
	    return TOO_MANY_DRIVERS;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TOO_MANY_FILES"))
#ifdef TOO_MANY_FILES
	    return TOO_MANY_FILES;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TOO_MANY_HDUS_TRACKED"))
#ifdef TOO_MANY_HDUS_TRACKED
	    return TOO_MANY_HDUS_TRACKED;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TRUE"))
#ifdef TRUE
	    return TRUE;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TSHORT"))
#ifdef TSHORT
	    return TSHORT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TSTRING"))
#ifdef TSTRING
	    return TSTRING;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TUINT"))
#ifdef TUINT
	    return TUINT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TULONG"))
#ifdef TULONG
	    return TULONG;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TUSHORT"))
#ifdef TUSHORT
	    return TUSHORT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_STRUC_KEY"))
#ifdef TYP_STRUC_KEY
	    return TYP_STRUC_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_CMPRS_KEY"))
#ifdef TYP_CMPRS_KEY
	    return TYP_CMPRS_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_SCAL_KEY"))
#ifdef TYP_SCAL_KEY
	    return TYP_SCAL_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_NULL_KEY"))
#ifdef TYP_NULL_KEY
	    return TYP_NULL_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_DIM_KEY"))
#ifdef TYP_DIM_KEY
	    return TYP_DIM_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_RANG_KEY"))
#ifdef TYP_RANG_KEY
	    return TYP_RANG_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_UNIT_KEY"))
#ifdef TYP_UNIT_KEY
	    return TYP_UNIT_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_DISP_KEY"))
#ifdef TYP_DISP_KEY
	    return TYP_DISP_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_HDUID_KEY"))
#ifdef TYP_HDUID_KEY
	    return TYP_HDUID_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_CKSUM_KEY"))
#ifdef TYP_CKSUM_KEY
	    return TYP_CKSUM_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_WCS_KEY"))
#ifdef TYP_WCS_KEY
	    return TYP_WCS_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_REFSYS_KEY"))
#ifdef TYP_REFSYS_KEY
	    return TYP_REFSYS_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_COMM_KEY"))
#ifdef TYP_COMM_KEY
	    return TYP_COMM_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_CONT_KEY"))
#ifdef TYP_CONT_KEY
	    return TYP_CONT_KEY;
#else
	    goto not_there;
#endif
	if (strEQ(name, "TYP_USER_KEY"))
#ifdef TYP_USER_KEY
	    return TYP_USER_KEY;
#else
	    goto not_there;
#endif
	break;
    case 'U':
	if (strEQ(name, "ULONG_IMG"))
#ifdef ULONG_IMG
	    return ULONG_IMG;
#else
	    goto not_there;
#endif
	if (strEQ(name, "UNKNOWN_EXT"))
#ifdef UNKNOWN_EXT
	    return UNKNOWN_EXT;
#else
	    goto not_there;
#endif
	if (strEQ(name, "UNKNOWN_REC"))
#ifdef UNKNOWN_REC
	    return UNKNOWN_REC;
#else
	    goto not_there;
#endif
	if (strEQ(name, "URL_PARSE_ERROR"))
#ifdef URL_PARSE_ERROR
	    return URL_PARSE_ERROR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "USE_MEM_BUFF"))
#ifdef USE_MEM_BUFF
	    return USE_MEM_BUFF;
#else
	    goto not_there;
#endif
	if (strEQ(name, "USHORT_IMG"))
#ifdef USHORT_IMG
	    return USHORT_IMG;
#else
	    goto not_there;
#endif
	break;
    case 'V':
	if (strEQ(name, "VALIDSTRUC"))
#ifdef VALIDSTRUC
	    return VALIDSTRUC;
#else
	    goto not_there;
#endif
	if (strEQ(name, "VALUE_UNDEFINED"))
#ifdef VALUE_UNDEFINED
	    return VALUE_UNDEFINED;
#else
	    goto not_there;
#endif
	break;
    case 'W':
	if (strEQ(name, "WCS_ERROR"))
#ifdef WCS_ERROR
	    return WCS_ERROR;
#else
	    goto not_there;
#endif
	if (strEQ(name, "WRITE_ERROR"))
#ifdef WRITE_ERROR
	    return WRITE_ERROR;
#else
	    goto not_there;
#endif
	break;
    case 'X':
	break;
    case 'Y':
	break;
    case 'Z':
	if (strEQ(name, "ZERO_SCALE"))
#ifdef ZERO_SCALE
	    return ZERO_SCALE;
#else
	    goto not_there;
#endif
	break;
    }
    errno = EINVAL;
    return 0;

not_there:
    errno = ENOENT;
    return 0;
}

#define NewFitsFile(fptr) \
do \
{	New(0, fptr, 1, FitsFile);\
	fptr->perlyunpacking = -1;\
	fptr->is_open = 1;\
} while(0)

#define AbortFitsFile(fptr) \
do \
{	Safefree(fptr);\
	fptr = 0;\
} while(0)

#line 1345 "CFITSIO.c"
#ifndef PERL_UNUSED_VAR
#  define PERL_UNUSED_VAR(var) if (0) var = var
#endif

#ifndef dVAR
#  define dVAR		dNOOP
#endif


/* This stuff is not part of the API! You have been warned. */
#ifndef PERL_VERSION_DECIMAL
#  define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
#endif
#ifndef PERL_DECIMAL_VERSION
#  define PERL_DECIMAL_VERSION \
	  PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
#endif
#ifndef PERL_VERSION_GE
#  define PERL_VERSION_GE(r,v,s) \
	  (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
#endif
#ifndef PERL_VERSION_LE
#  define PERL_VERSION_LE(r,v,s) \
	  (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
#endif

/* XS_INTERNAL is the explicit static-linkage variant of the default
 * XS macro.
 *
 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
 * "STATIC", ie. it exports XSUB symbols. You probably don't want that
 * for anything but the BOOT XSUB.
 *
 * See XSUB.h in core!
 */


/* TODO: This might be compatible further back than 5.10.0. */
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
#  undef XS_EXTERNAL
#  undef XS_INTERNAL
#  if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
#    define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
#    define XS_INTERNAL(name) STATIC XSPROTO(name)
#  endif
#  if defined(__SYMBIAN32__)
#    define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
#    define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name)
#  endif
#  ifndef XS_EXTERNAL
#    if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
#      define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
#      define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__)
#    else
#      ifdef __cplusplus
#        define XS_EXTERNAL(name) extern "C" XSPROTO(name)
#        define XS_INTERNAL(name) static XSPROTO(name)
#      else
#        define XS_EXTERNAL(name) XSPROTO(name)
#        define XS_INTERNAL(name) STATIC XSPROTO(name)
#      endif
#    endif
#  endif
#endif

/* perl >= 5.10.0 && perl <= 5.15.1 */


/* The XS_EXTERNAL macro is used for functions that must not be static
 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
 * macro defined, the best we can do is assume XS is the same.
 * Dito for XS_INTERNAL.
 */
#ifndef XS_EXTERNAL
#  define XS_EXTERNAL(name) XS(name)
#endif
#ifndef XS_INTERNAL
#  define XS_INTERNAL(name) XS(name)
#endif

/* Now, finally, after all this mess, we want an ExtUtils::ParseXS
 * internal macro that we're free to redefine for varying linkage due
 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
 */

#undef XS_EUPXS
#if defined(PERL_EUPXS_ALWAYS_EXPORT)
#  define XS_EUPXS(name) XS_EXTERNAL(name)
#else
   /* default to internal */
#  define XS_EUPXS(name) XS_INTERNAL(name)
#endif

#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)

/* prototype to pass -Wmissing-prototypes */
STATIC void
S_croak_xs_usage(const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(const CV *const cv, const char *const params)
{
    const GV *const gv = CvGV(cv);

    PERL_ARGS_ASSERT_CROAK_XS_USAGE;

    if (gv) {
        const char *const gvname = GvNAME(gv);
        const HV *const stash = GvSTASH(gv);
        const char *const hvname = stash ? HvNAME(stash) : NULL;

        if (hvname)
	    Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params);
        else
	    Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
	Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#define croak_xs_usage        S_croak_xs_usage

#endif

/* NOTE: the prototype of newXSproto() is different in versions of perls,
 * so we define a portable version of newXSproto()
 */
#ifdef newXS_flags
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
#else
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
#endif /* !defined(newXS_flags) */

#if PERL_VERSION_LE(5, 21, 5)
#  define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file)
#else
#  define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b)
#endif

#line 1489 "CFITSIO.c"

XS_EUPXS(XS_Astro__FITS__CFITSIO_constant); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_constant)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "name, arg");
    {
	char *	name;
	int	arg = (int)SvIV(ST(1))
;
	double	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			name = (char *)NULL;
		else
			name = (char *)SvPV(ST(0),PL_na);
	}
;

	RETVAL = constant(name, arg);
	XSprePUSH;
	PUSHn((double)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_sizeof_datatype); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_sizeof_datatype)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "type");
    {
	int	type = (int)SvIV(ST(0))
;
	int	RETVAL;
	dXSTARG;

	RETVAL = sizeof_datatype(type);
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_PerlyUnpacking); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_PerlyUnpacking)
{
    dVAR; dXSARGS;
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
    {
	int	RETVAL;
	dXSTARG;
#line 1351 "CFITSIO.xs"
	        RETVAL = PerlyUnpacking( items > 0 ? SvIV((ST(0))) : -1 );
#line 1551 "CFITSIO.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_perlyunpacking); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_perlyunpacking)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items < 1)
       croak_xs_usage(cv,  "fptr, ...");
    {
	FitsFile *	fptr;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 1361 "CFITSIO.xs"
	        if( items > 1 )
                  fptr->perlyunpacking = SvIV((ST(1)));
                RETVAL = fptr->perlyunpacking;
#line 1581 "CFITSIO.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO__is_open); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO__is_open)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items < 1)
       croak_xs_usage(cv,  "fptr, ...");
    {
	FitsFile *	fptr;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 1373 "CFITSIO.xs"
	        if( items > 1 )
                  fptr->is_open = SvIV((ST(1)));
                RETVAL = fptr->is_open;
#line 1611 "CFITSIO.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_PERLYUNPACKING); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_PERLYUNPACKING)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "fptr");
    {
	FitsFile *	fptr;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 1385 "CFITSIO.xs"
                RETVAL = PERLYUNPACKING(fptr->perlyunpacking);
#line 1639 "CFITSIO.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_DESTROY); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_DESTROY)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "fptr");
    {
	FitsFile *	fptr;
#line 1395 "CFITSIO.xs"
                int status = 0;
#line 1658 "CFITSIO.c"

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 1397 "CFITSIO.xs"
                if ( fptr->is_open )
                {
		  ffclos( fptr->fptr, &status );
		  if ( status )
		  {
		    char * err_text = get_mortalspace(FLEN_ERRMSG,TBYTE);
		    ffgerr(status,err_text);
		    Safefree(fptr);
		    croak( "fitsfilePtr::DESTROY: error closing FITS file: %s",
		            err_text );
	          }
		}
                Safefree(fptr);
#line 1680 "CFITSIO.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtam); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtam)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "gfptr, mfptr, hdupos, status");
    {
	fitsfile *	gfptr;
	fitsfile *	mfptr;
	int	hdupos = (int)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    gfptr = fitsfileSV(ST(0));
        }
        else
            croak("gfptr is not of type fitsfilePtr")
;
#line 1421 "CFITSIO.xs"
		/*
		 * (mfptr == NULL) => member HDU is identified by hdupos
		 */
		if (ST(1)==&PL_sv_undef)
			mfptr = NULL;
		else if (sv_derived_from(ST(1),"fitsfilePtr"))
			mfptr = fitsfileSV(ST(1));
		else
			croak("mfptr is not of type fitsfilePtr");
		RETVAL = ffgtam(gfptr,mfptr,hdupos,&status);
#line 1720 "CFITSIO.c"
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffasfm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffasfm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "tform, typecode, width, decimals, status");
    {
	char *	tform;
	int	typecode;
	long	width;
	int	decimals;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			tform = (char *)NULL;
		else
			tform = (char *)SvPV(ST(0),PL_na);
	}
;
#line 1445 "CFITSIO.xs"
		RETVAL = ffasfm(tform,&typecode,&width,&decimals,&status);
		if (ST(1)!=&PL_sv_undef) sv_setiv(ST(1),typecode);
		if (ST(2)!=&PL_sv_undef) sv_setiv(ST(2),width);
		if (ST(3)!=&PL_sv_undef) sv_setiv(ST(3),decimals);
#line 1759 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffbnfm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffbnfm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "tform, typecode, repeat, width, status");
    {
	char *	tform;
	int	typecode;
	long	repeat;
	long	width;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			tform = (char *)NULL;
		else
			tform = (char *)SvPV(ST(0),PL_na);
	}
;
#line 1463 "CFITSIO.xs"
		RETVAL = ffbnfm(tform,&typecode,&repeat,&width,&status);
		if (ST(1)!=&PL_sv_undef) sv_setiv(ST(1),typecode);
		if (ST(2)!=&PL_sv_undef) sv_setiv(ST(2),repeat);
		if (ST(3)!=&PL_sv_undef) sv_setiv(ST(3),width);
#line 1798 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffbnfmll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffbnfmll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "tform, typecode, repeat, width, status");
    {
	char *	tform;
	int	typecode;
	LONGLONG	repeat;
	long	width;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			tform = (char *)NULL;
		else
			tform = (char *)SvPV(ST(0),PL_na);
	}
;
#line 1481 "CFITSIO.xs"
		RETVAL = ffbnfmll(tform,&typecode,&repeat,&width,&status);
		if (ST(1)!=&PL_sv_undef) sv_setiv(ST(1),typecode);
		if (ST(2)!=&PL_sv_undef) sv_setiv(ST(2),repeat);
		if (ST(3)!=&PL_sv_undef) sv_setiv(ST(3),width);
#line 1837 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcrow); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcrow)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, datatype, expr, firstrow, nelements, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	datatype = (int)SvIV(ST(1))
;
	char *	expr;
	long	firstrow = (long)SvIV(ST(3))
;
	long	nelements = (long)SvIV(ST(4))
;
	SV *	nulval = ST(5)
;
	void *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(2) == &PL_sv_undef)
			expr = (char *)NULL;
		else
			expr = (char *)SvPV(ST(2),PL_na);
	}
;
#line 1504 "CFITSIO.xs"
		array = get_mortalspace(nelements,datatype);
		RETVAL=ffcrow(
			fptr->fptr,datatype,expr,firstrow,nelements,
			(nulval!=&PL_sv_undef) ? pack1D(nulval,datatype):NULL,
			array,&anynul,&status
		);
		FIXME("ffcrow: I should be calling fftexp (no harm done, however)");
		unpack1D(ST(6),array,nelements,datatype,fptr->perlyunpacking);
#line 1895 "CFITSIO.c"
	sv_setiv(ST(7), (IV)anynul);
	SvSETMAGIC(ST(7));
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcalc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcalc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "infptr, expr, outfptr, parName, parInfo, status");
    {
	fitsfile *	infptr;
	char *	expr;
	fitsfile *	outfptr;
	char *	parName;
	char *	parInfo;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			expr = (char *)NULL;
		else
			expr = (char *)SvPV(ST(1),PL_na);
	}
;

	if (sv_derived_from(ST(2), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(2));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	{
		if (ST(3) == &PL_sv_undef)
			parName = (char *)NULL;
		else
			parName = (char *)SvPV(ST(3),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			parInfo = (char *)NULL;
		else
			parInfo = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffcalc(infptr, expr, outfptr, parName, parInfo, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcalc_rng); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcalc_rng)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "infptr, expr, outfptr, parName, parInfo, nranges, firstrow, lastrow, status");
    {
	fitsfile *	infptr;
	char *	expr;
	fitsfile *	outfptr;
	char *	parName;
	char *	parInfo;
	int	nranges = (int)SvIV(ST(5))
;
	long *	firstrow = (long *)packND(ST(6),TLONG)
;
	long *	lastrow = (long *)packND(ST(7),TLONG)
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			expr = (char *)NULL;
		else
			expr = (char *)SvPV(ST(1),PL_na);
	}
;

	if (sv_derived_from(ST(2), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(2));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	{
		if (ST(3) == &PL_sv_undef)
			parName = (char *)NULL;
		else
			parName = (char *)SvPV(ST(3),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			parInfo = (char *)NULL;
		else
			parInfo = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffcalc_rng(infptr, expr, outfptr, parName, parInfo, nranges, firstrow, lastrow, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtch); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtch)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "gfptr, grouptype, status");
    {
	fitsfile *	gfptr;
	int	grouptype = (int)SvIV(ST(1))
;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    gfptr = fitsfileSV(ST(0));
        }
        else
            croak("gfptr is not of type fitsfilePtr")
;

	RETVAL = ffgtch(gfptr, grouptype, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpmrk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpmrk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {

	ffpmrk();
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcmrk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcmrk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {

	ffcmrk();
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcmsg); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcmsg)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {

	ffcmsg();
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffclos); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffclos)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "fptr, status");
    {
	FitsFile *	fptr;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 1582 "CFITSIO.xs"
                RETVAL = ffclos(fptr->fptr, &status);
                fptr->is_open = 0;
#line 2146 "CFITSIO.c"
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtcm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtcm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "gfptr, cmopt, status");
    {
	fitsfile *	gfptr;
	int	cmopt = (int)SvIV(ST(1))
;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    gfptr = fitsfileSV(ST(0));
        }
        else
            croak("gfptr is not of type fitsfilePtr")
;

	RETVAL = ffgtcm(gfptr, cmopt, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcmps); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcmps)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "templt, string, casesen, match, exact");
    {
	char *	templt;
	char *	string;
	int	casesen = (int)SvIV(ST(2))
;
	int	match = (int)SvIV(ST(3))
;
	int	exact = (int)SvIV(ST(4))
;

	{
		if (ST(0) == &PL_sv_undef)
			templt = (char *)NULL;
		else
			templt = (char *)SvPV(ST(0),PL_na);
	}
;

	{
		if (ST(1) == &PL_sv_undef)
			string = (char *)NULL;
		else
			string = (char *)SvPV(ST(1),PL_na);
	}
;

	ffcmps(templt, string, casesen, &match, &exact);
	sv_setiv(ST(3), (IV)match);
	SvSETMAGIC(ST(3));
	sv_setiv(ST(4), (IV)exact);
	SvSETMAGIC(ST(4));
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcmph); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcmph)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "fptr, status");
    {
	fitsfile *	fptr;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffcmph(fptr, &status);
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcpcl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcpcl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "infptr, outfptr, incolnum, outcolnum, create_col, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	int	incolnum = (int)SvIV(ST(2))
;
	int	outcolnum = (int)SvIV(ST(3))
;
	int	create_col = (int)SvIV(ST(4))
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	RETVAL = ffcpcl(infptr, outfptr, incolnum, outcolnum, create_col, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#if (CFITSIO_MAJOR > 2 && (CFITSIO_MINOR > 44))
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffccls); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffccls)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "infptr, outfptr, incolnum, outcolnum, ncols, create_col, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	int	incolnum = (int)SvIV(ST(2))
;
	int	outcolnum = (int)SvIV(ST(3))
;
	int	ncols = (int)SvIV(ST(4))
;
	int	create_col = (int)SvIV(ST(5))
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	RETVAL = ffccls(infptr, outfptr, incolnum, outcolnum, ncols, create_col, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcprw); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcprw)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "infptr, outfptr, firstrow, nrows, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	LONGLONG	firstrow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nrows = (LONGLONG)SvIV(ST(3))
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	RETVAL = ffcprw(infptr, outfptr, firstrow, nrows, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcpsr); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcpsr)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "infptr, outfptr, firstrow, nrows, row_status, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	LONGLONG	firstrow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nrows = (LONGLONG)SvIV(ST(3))
;
	logical *	row_status = (logical *)packND(ST(4),TLOGICAL)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	RETVAL = ffcpsr(infptr, outfptr, firstrow, nrows, row_status, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcpdt); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcpdt)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "infptr, outfptr, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	RETVAL = ffcpdt(infptr, outfptr, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffwrhdu); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffwrhdu)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "infptr, stream, status");
    {
	fitsfile *	infptr;
	FILE *	stream = PerlIO_findFILE(IoIFP(sv_2io(ST(1))))
;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	RETVAL = ffwrhdu(infptr, stream, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtcp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtcp)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "infptr, outfptr, cpopt, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	int	cpopt = (int)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	RETVAL = ffgtcp(infptr, outfptr, cpopt, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcpfl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcpfl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "infptr, outfptr, previous, current, following, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	int	previous = (int)SvIV(ST(2))
;
	int	current = (int)SvIV(ST(3))
;
	int	following = (int)SvIV(ST(4))
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	RETVAL = ffcpfl(infptr, outfptr, previous, current, following, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcopy); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcopy)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "infptr, outfptr, morekeys, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	int	morekeys = (int)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	RETVAL = ffcopy(infptr, outfptr, morekeys, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcphd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcphd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "infptr, outfptr, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	RETVAL = ffcphd(infptr, outfptr, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcpky); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcpky)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "infptr, outfptr, innum, outnum, keyroot, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	int	innum = (int)SvIV(ST(2))
;
	int	outnum = (int)SvIV(ST(3))
;
	char *	keyroot;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	{
		if (ST(4) == &PL_sv_undef)
			keyroot = (char *)NULL;
		else
			keyroot = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffcpky(infptr, outfptr, innum, outnum, keyroot, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgmcp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgmcp)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "gfptr, mfptr, member, cpopt, status");
    {
	fitsfile *	gfptr;
	fitsfile *	mfptr;
	long	member = (long)SvIV(ST(2))
;
	int	cpopt = (int)SvIV(ST(3))
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    gfptr = fitsfileSV(ST(0));
        }
        else
            croak("gfptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    mfptr = fitsfileSV(ST(1));
        }
        else
            croak("mfptr is not of type fitsfilePtr")
;

	RETVAL = ffgmcp(gfptr, mfptr, member, cpopt, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_create_file); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_create_file)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "name, status");
    {
	char *	name;
	int	status = (int)SvIV(ST(1))
;
#line 1785 "CFITSIO.xs"
		FitsFile* fptr;
#line 2792 "CFITSIO.c"
	FitsFile *	RETVAL;

	{
		if (ST(0) == &PL_sv_undef)
			name = (char *)NULL;
		else
			name = (char *)SvPV(ST(0),PL_na);
	}
;
#line 1787 "CFITSIO.xs"
		NewFitsFile(fptr);
		if (ffinit(&(fptr->fptr),name,&status))
		  AbortFitsFile(fptr);
		RETVAL = fptr;

#line 2808 "CFITSIO.c"
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    if (RETVAL != NULL)
		    sv_setref_pv(RETVALSV, "fitsfilePtr", (void*)RETVAL);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffinit); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffinit)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, name, status");
    {
	FitsFile *	fptr;
	char *	name;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(1) == &PL_sv_undef)
			name = (char *)NULL;
		else
			name = (char *)SvPV(ST(1),PL_na);
	}
;
#line 1804 "CFITSIO.xs"
		NewFitsFile(fptr);
		RETVAL = ffinit(&(fptr->fptr),name,&status);
		if (RETVAL)
		  AbortFitsFile(fptr);
#line 2850 "CFITSIO.c"
	if (fptr != NULL)
	        sv_setref_pv(ST(0), "fitsfilePtr", (void*)fptr);
	SvSETMAGIC(ST(0));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdkinit); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdkinit)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, name, status");
    {
	FitsFile *	fptr;
	char *	name;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(1) == &PL_sv_undef)
			name = (char *)NULL;
		else
			name = (char *)SvPV(ST(1),PL_na);
	}
;
#line 1821 "CFITSIO.xs"
		NewFitsFile(fptr);
		RETVAL = ffdkinit(&(fptr->fptr),name,&status);
		if (RETVAL)
		  AbortFitsFile(fptr);
#line 2890 "CFITSIO.c"
	if (fptr != NULL)
	        sv_setref_pv(ST(0), "fitsfilePtr", (void*)fptr);
	SvSETMAGIC(ST(0));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtcr); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtcr)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, grpname, grouptype, status");
    {
	fitsfile *	fptr;
	char *	grpname;
	int	grouptype = (int)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			grpname = (char *)NULL;
		else
			grpname = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffgtcr(fptr, grpname, grouptype, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcrhd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcrhd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "fptr, status");
    {
	fitsfile *	fptr;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffcrhd(fptr, &status);
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcrim); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcrim)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, bitpix, naxis, naxes, status");
    {
	fitsfile *	fptr;
	int	bitpix = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffcrim(fptr, bitpix, naxis, naxes, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcrimll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcrimll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, bitpix, naxis, naxes, status");
    {
	fitsfile *	fptr;
	int	bitpix = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	LONGLONG *	naxes = (LONGLONG *)packND(ST(3),TLONGLONG)
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffcrimll(fptr, bitpix, naxis, naxes, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcrtb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcrtb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, tbltype, naxis2, tfields, ttype, tform, tunit, extname, status");
    {
	fitsfile *	fptr;
	int	tbltype = (int)SvIV(ST(1))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(2))
;
	int	tfields = (int)SvIV(ST(3))
;
	char **	ttype = (char **)packND(ST(4),TSTRING)
;
	char **	tform = (char **)packND(ST(5),TSTRING)
;
	char **	tunit = (char **)packND(ST(6),TSTRING)
;
	char *	extname;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(7) == &PL_sv_undef)
			extname = (char *)NULL;
		else
			extname = (char *)SvPV(ST(7),PL_na);
	}
;

	RETVAL = ffcrtb(fptr, tbltype, naxis2, tfields, ttype, tform, tunit, extname, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcpht); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcpht)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "infptr, outfptr, firstrow, nrows, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	LONGLONG	firstrow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nrows = (LONGLONG)SvIV(ST(3))
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	RETVAL = ffcpht(infptr, outfptr, firstrow, nrows, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_create_template); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_create_template)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "filename, tpltfile, status");
    {
	char *	filename;
	char *	tpltfile;
	int	status = (int)SvIV(ST(2))
;
#line 1914 "CFITSIO.xs"
		FitsFile * fptr;
#line 3158 "CFITSIO.c"
	FitsFile *	RETVAL;

	{
		if (ST(0) == &PL_sv_undef)
			filename = (char *)NULL;
		else
			filename = (char *)SvPV(ST(0),PL_na);
	}
;

	{
		if (ST(1) == &PL_sv_undef)
			tpltfile = (char *)NULL;
		else
			tpltfile = (char *)SvPV(ST(1),PL_na);
	}
;
#line 1916 "CFITSIO.xs"
		NewFitsFile(fptr);
		if (fftplt(&(fptr->fptr),filename,tpltfile,&status))
		   AbortFitsFile(fptr);
		RETVAL = fptr;
#line 3181 "CFITSIO.c"
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    if (RETVAL != NULL)
		    sv_setref_pv(RETVALSV, "fitsfilePtr", (void*)RETVAL);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fftplt); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fftplt)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, filename, tpltfile, status");
    {
	FitsFile *	fptr;
	char *	filename;
	char *	tpltfile;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(1) == &PL_sv_undef)
			filename = (char *)NULL;
		else
			filename = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			tpltfile = (char *)NULL;
		else
			tpltfile = (char *)SvPV(ST(2),PL_na);
	}
;
#line 1933 "CFITSIO.xs"
		NewFitsFile(fptr);
		RETVAL = fftplt(&(fptr->fptr),filename,tpltfile,&status);
		if (RETVAL)
		   AbortFitsFile(fptr);
#line 3232 "CFITSIO.c"
	if (fptr != NULL)
	        sv_setref_pv(ST(0), "fitsfilePtr", (void*)fptr);
	SvSETMAGIC(ST(0));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdt2s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdt2s)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "year, month, day, datestr, status");
    {
	int	year = (int)SvIV(ST(0))
;
	int	month = (int)SvIV(ST(1))
;
	int	day = (int)SvIV(ST(2))
;
	char *	datestr;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;
#line 1952 "CFITSIO.xs"
		datestr = get_mortalspace(11,TBYTE); /* YYYY-MM-DD or dd/mm/yy */
		RETVAL=ffdt2s(year,month,day,datestr,&status);
#line 3267 "CFITSIO.c"
	if (datestr != NULL)
		sv_setpv((SV *)ST(3), datestr);
	SvSETMAGIC(ST(3));
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdsum); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdsum)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "ascii, complm, sum");
    {
	char *	ascii;
	int	complm = (int)SvIV(ST(1))
;
	unsigned long	sum = (unsigned long)SvUV(ST(2))
;
	unsigned long	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			ascii = (char *)NULL;
		else
			ascii = (char *)SvPV(ST(0),PL_na);
	}
;

	RETVAL = ffdsum(ascii, complm, &sum);
	sv_setuv(ST(2), (UV)sum);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdtdm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdtdm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, tdimstr, colnum, naxis, naxes, status");
    {
	FitsFile *	fptr;
	char *	tdimstr;
	int	colnum = (int)SvIV(ST(2))
;
	int	naxis;
	long *	naxes;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			tdimstr = (char *)NULL;
		else
			tdimstr = (char *)SvPV(ST(1),PL_na);
	}
;
#line 1981 "CFITSIO.xs"
		if (ST(4)!=&PL_sv_undef) { /* caller wants naxes set */
			ffdtdm(fptr->fptr,tdimstr,colnum,0,&naxis,NULL,&status);
			naxes = get_mortalspace(naxis,TLONG);
		}
		else {
			naxes = NULL;
			naxis = 0;
		}
		RETVAL=ffdtdm(fptr->fptr,tdimstr,colnum,naxis,&naxis,naxes,&status);
		if (ST(3)!=&PL_sv_undef) sv_setiv(ST(3),naxis);
		if (ST(4)!=&PL_sv_undef) unpack1D(ST(4),naxes,naxis,TLONG,fptr->perlyunpacking);
#line 3359 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdtdmll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdtdmll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, tdimstr, colnum, naxis, naxes, status");
    {
	FitsFile *	fptr;
	char *	tdimstr;
	int	colnum = (int)SvIV(ST(2))
;
	int	naxis;
	LONGLONG *	naxes;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			tdimstr = (char *)NULL;
		else
			tdimstr = (char *)SvPV(ST(1),PL_na);
	}
;
#line 2008 "CFITSIO.xs"
		if (ST(4)!=&PL_sv_undef) { /* caller wants naxes set */
			ffdtdmll(fptr->fptr,tdimstr,colnum,0,&naxis,NULL,&status);
			naxes = get_mortalspace(naxis,TLONGLONG);
		}
		else {
			naxes = NULL;
			naxis = 0;
		}
		RETVAL=ffdtdmll(fptr->fptr,tdimstr,colnum,naxis,&naxis,naxes,&status);
		if (ST(3)!=&PL_sv_undef) sv_setiv(ST(3),naxis);
		if (ST(4)!=&PL_sv_undef) unpack1D(ST(4),naxes,naxis,TLONGLONG,fptr->perlyunpacking);
#line 3414 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_decomp_img); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_decomp_img)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "infptr, outfptr, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	RETVAL = fits_decomp_img(infptr, outfptr, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdcol); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdcol)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, colnum, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffdcol(fptr, colnum, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdelt); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdelt)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "fptr, status");
    {
	FitsFile *	fptr;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2053 "CFITSIO.xs"
		RETVAL = ffdelt(fptr->fptr, &status );
		fptr->is_open = 0;
#line 3519 "CFITSIO.c"
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdhdu); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdhdu)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, hdutype, status");
    {
	fitsfile *	fptr;
	int	hdutype;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2068 "CFITSIO.xs"
		RETVAL = ffdhdu(fptr,&hdutype,&status);
		if (ST(1) != &PL_sv_undef) sv_setiv(ST(1),hdutype);
#line 3553 "CFITSIO.c"
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdkey); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdkey)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, keyname, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffdkey(fptr, keyname, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdrec); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdrec)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, keynum, status");
    {
	fitsfile *	fptr;
	int	keynum = (int)SvIV(ST(1))
;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffdrec(fptr, keynum, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdrrg); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdrrg)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, rangelist, status");
    {
	fitsfile *	fptr;
	char *	rangelist;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			rangelist = (char *)NULL;
		else
			rangelist = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffdrrg(fptr, rangelist, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdrws); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdrws)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, rowlist, nrows, status");
    {
	fitsfile *	fptr;
	long *	rowlist = (long *)packND(ST(1),TLONG)
;
	long	nrows = (long)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffdrws(fptr, rowlist, nrows, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdrwsll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdrwsll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, rowlist, nrows, status");
    {
	fitsfile *	fptr;
	LONGLONG*	rowlist = (LONGLONG *)packND(ST(1),TLONGLONG)
;
	LONGLONG	nrows = (LONGLONG)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffdrwsll(fptr, rowlist, nrows, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdrow); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdrow)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, firstrow, nrows, status");
    {
	fitsfile *	fptr;
	LONGLONG	firstrow = (LONGLONG)SvIV(ST(1))
;
	LONGLONG	nrows = (LONGLONG)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffdrow(fptr, firstrow, nrows, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffesum); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffesum)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "sum, complm, ascii");
    {
	unsigned long	sum = (unsigned long)SvUV(ST(0))
;
	int	complm = (int)SvIV(ST(1))
;
	char *	ascii;
#line 2151 "CFITSIO.xs"
		ascii = get_mortalspace(17,TBYTE);
		ffesum(sum,complm,ascii);
#line 3797 "CFITSIO.c"
	if (ascii != NULL)
		sv_setpv((SV *)ST(2), ascii);
	SvSETMAGIC(ST(2));
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffexist); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffexist)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "filename, exists, status");
    {
	char*	filename;
	int	exists;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			filename = (char *)NULL;
		else
			filename = (char *)SvPV(ST(0),PL_na);
	}
;

	RETVAL = ffexist(filename, &exists, &status);
	sv_setiv(ST(1), (IV)exists);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffflmd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffflmd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, iomode, status");
    {
	fitsfile *	fptr;
	int	iomode;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffflmd(fptr, &iomode, &status);
	sv_setiv(ST(1), (IV)iomode);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffflnm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffflnm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, filename, status");
    {
	fitsfile *	fptr;
	char *	filename;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2188 "CFITSIO.xs"
		filename = get_mortalspace(FLEN_FILENAME,TBYTE);
		RETVAL=ffflnm(fptr,filename,&status);
#line 3899 "CFITSIO.c"
	if (filename != NULL)
		sv_setpv((SV *)ST(1), filename);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgnxk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgnxk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, inclist, ninc, exclist, nexc, card, status");
    {
	fitsfile *	fptr;
	char **	inclist = (char **)packND(ST(1),TSTRING)
;
	int	ninc = (int)SvIV(ST(2))
;
	char **	exclist = (char **)packND(ST(3),TSTRING)
;
	int	nexc = (int)SvIV(ST(4))
;
	char *	card;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2208 "CFITSIO.xs"
		card = get_mortalspace(FLEN_CARD,TBYTE);
		RETVAL=ffgnxk(fptr,inclist,ninc,exclist,nexc,card,&status);
#line 3944 "CFITSIO.c"
	if (card != NULL)
		sv_setpv((SV *)ST(5), card);
	SvSETMAGIC(ST(5));
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffffrw); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffffrw)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, expr, rownum, status");
    {
	fitsfile *	fptr;
	char *	expr;
	long	rownum;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			expr = (char *)NULL;
		else
			expr = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffffrw(fptr, expr, &rownum, &status);
	sv_setiv(ST(2), (IV)rownum);
	SvSETMAGIC(ST(2));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fffrow); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fffrow)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, expr, firstrow, nrows, n_good_rows, row_status, status");
    {
	FitsFile *	fptr;
	char *	expr;
	long	firstrow = (long)SvIV(ST(2))
;
	long	nrows = (long)SvIV(ST(3))
;
	long	n_good_rows;
	logical *	row_status;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			expr = (char *)NULL;
		else
			expr = (char *)SvPV(ST(1),PL_na);
	}
;
#line 2241 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nrows*sizeof_datatype(TLOGICAL));
			RETVAL=fffrow(fptr->fptr,expr,firstrow,nrows,&n_good_rows,(logical*)SvPV(ST(5),PL_na),&status);
		}
		else {
			row_status = get_mortalspace(nrows,TLOGICAL);
			RETVAL=fffrow(fptr->fptr,expr,firstrow,nrows,&n_good_rows,row_status,&status);
			unpack1D(ST(5),row_status,nrows,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(4) != &PL_sv_undef) sv_setiv(ST(4), n_good_rows); /* value-added */
#line 4046 "CFITSIO.c"
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffflus); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffflus)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "fptr, status");
    {
	fitsfile *	fptr;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffflus(fptr, &status);
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffihtps); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffihtps)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	int	RETVAL;
	dXSTARG;

	RETVAL = ffihtps();
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffchtps); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffchtps)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	int	RETVAL;
	dXSTARG;

	RETVAL = ffchtps();
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffvhtps); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffvhtps)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "flag");
    {
	int	flag = (int)SvIV(ST(0))
;

	ffvhtps(flag);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffshdwn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffshdwn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "flag");
    {
	int	flag = (int)SvIV(ST(0))
;

	ffshdwn(flag);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtmo); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtmo)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	int	RETVAL;
	dXSTARG;

	RETVAL = ffgtmo();
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffstmo); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffstmo)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "seconds, status");
    {
	int	seconds = (int)SvIV(ST(0))
;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	RETVAL = ffstmo(seconds, &status);
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffflsh); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffflsh)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, clearbuf, status");
    {
	fitsfile *	fptr;
	int	clearbuf = (int)SvIV(ST(1))
;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffflsh(fptr, clearbuf, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgacl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgacl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, colnum, ttype, tbcol, tunit, tform, scale, zero, nulstr, tdisp, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	char *	ttype;
	long	tbcol;
	char *	tunit;
	char *	tform;
	double	scale;
	double	zero;
	char *	nulstr;
	char *	tdisp;
	int	status = (int)SvIV(ST(10))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2329 "CFITSIO.xs"
		ttype = (ST(2) != &PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		tunit = (ST(4) != &PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		tform = (ST(5) != &PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		nulstr= (ST(8) != &PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		tdisp = (ST(9) != &PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		RETVAL=ffgacl(fptr,colnum,ttype,&tbcol,tunit,tform,&scale,&zero,nulstr,tdisp,&status);
		if (ST(3) != &PL_sv_undef) sv_setiv(ST(3),tbcol);
		if (ST(6) != &PL_sv_undef) sv_setnv(ST(6),scale);
		if (ST(7) != &PL_sv_undef) sv_setnv(ST(7),zero);
#line 4276 "CFITSIO.c"
	if (ttype != NULL)
		sv_setpv((SV *)ST(2), ttype);
	SvSETMAGIC(ST(2));
	if (tunit != NULL)
		sv_setpv((SV *)ST(4), tunit);
	SvSETMAGIC(ST(4));
	if (tform != NULL)
		sv_setpv((SV *)ST(5), tform);
	SvSETMAGIC(ST(5));
	if (nulstr != NULL)
		sv_setpv((SV *)ST(8), nulstr);
	SvSETMAGIC(ST(8));
	if (tdisp != NULL)
		sv_setpv((SV *)ST(9), tdisp);
	SvSETMAGIC(ST(9));
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgbcl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgbcl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, colnum, ttype, tunit, dtype, repeat, scale, zero, nulval, tdisp, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	char *	ttype;
	char *	tunit;
	char *	dtype;
	long	repeat;
	double	scale;
	double	zero;
	long	nulval;
	char *	tdisp;
	int	status = (int)SvIV(ST(10))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2364 "CFITSIO.xs"
		ttype = (ST(2) != &PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		tunit = (ST(3) != &PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		dtype = (ST(4) != &PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		tdisp = (ST(9) != &PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		RETVAL=ffgbcl(fptr,colnum,ttype,tunit,dtype,&repeat,&scale,&zero,&nulval,tdisp,&status);
		if (ST(5) != &PL_sv_undef) sv_setiv(ST(5),repeat);
		if (ST(6) != &PL_sv_undef) sv_setnv(ST(6),scale);
		if (ST(7) != &PL_sv_undef) sv_setnv(ST(7),zero);
		if (ST(8) != &PL_sv_undef) sv_setiv(ST(8),nulval);
#line 4341 "CFITSIO.c"
	if (ttype != NULL)
		sv_setpv((SV *)ST(2), ttype);
	SvSETMAGIC(ST(2));
	if (tunit != NULL)
		sv_setpv((SV *)ST(3), tunit);
	SvSETMAGIC(ST(3));
	if (dtype != NULL)
		sv_setpv((SV *)ST(4), dtype);
	SvSETMAGIC(ST(4));
	if (tdisp != NULL)
		sv_setpv((SV *)ST(9), tdisp);
	SvSETMAGIC(ST(9));
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgbclll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgbclll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, colnum, ttype, tunit, dtype, repeat, scale, zero, nulval, tdisp, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	char *	ttype;
	char *	tunit;
	char *	dtype;
	LONGLONG	repeat;
	double	scale;
	double	zero;
	LONGLONG	nulval;
	char *	tdisp;
	int	status = (int)SvIV(ST(10))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2398 "CFITSIO.xs"
		ttype = (ST(2) != &PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		tunit = (ST(3) != &PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		dtype = (ST(4) != &PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		tdisp = (ST(9) != &PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		RETVAL=ffgbclll(fptr,colnum,ttype,tunit,dtype,&repeat,&scale,&zero,&nulval,tdisp,&status);
		if (ST(5) != &PL_sv_undef) sv_setiv(ST(5),repeat);
		if (ST(6) != &PL_sv_undef) sv_setnv(ST(6),scale);
		if (ST(7) != &PL_sv_undef) sv_setnv(ST(7),zero);
		if (ST(8) != &PL_sv_undef) sv_setiv(ST(8),nulval);
#line 4403 "CFITSIO.c"
	if (ttype != NULL)
		sv_setpv((SV *)ST(2), ttype);
	SvSETMAGIC(ST(2));
	if (tunit != NULL)
		sv_setpv((SV *)ST(3), tunit);
	SvSETMAGIC(ST(3));
	if (dtype != NULL)
		sv_setpv((SV *)ST(4), dtype);
	SvSETMAGIC(ST(4));
	if (tdisp != NULL)
		sv_setpv((SV *)ST(9), tdisp);
	SvSETMAGIC(ST(9));
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcks); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcks)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, datasum, hdusum, status");
    {
	fitsfile *	fptr;
	unsigned long	datasum;
	unsigned long	hdusum;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2425 "CFITSIO.xs"
		RETVAL = ffgcks(fptr,&datasum,&hdusum,&status);
		if (ST(1) != &PL_sv_undef) sv_setiv(ST(1), datasum); /* value-added */
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2), hdusum); /* value-added */
#line 4451 "CFITSIO.c"
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcnn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcnn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, casesen, templt, colname, colnum, status");
    {
	fitsfile *	fptr;
	int	casesen = (int)SvIV(ST(1))
;
	char *	templt;
	char *	colname;
	int	colnum;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(2) == &PL_sv_undef)
			templt = (char *)NULL;
		else
			templt = (char *)SvPV(ST(2),PL_na);
	}
;
#line 2444 "CFITSIO.xs"
		colname = get_mortalspace(FLEN_KEYWORD,TBYTE);
		RETVAL=ffgcnn(fptr,casesen,templt,colname,&colnum,&status);
		if (ST(4) != &PL_sv_undef) sv_setiv(ST(4),colnum); /* value-added */
#line 4498 "CFITSIO.c"
	if (colname != NULL)
		sv_setpv((SV *)ST(3), colname);
	SvSETMAGIC(ST(3));
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcno); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcno)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, casesen, templt, colnum, status");
    {
	fitsfile *	fptr;
	int	casesen = (int)SvIV(ST(1))
;
	char *	templt;
	int	colnum;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(2) == &PL_sv_undef)
			templt = (char *)NULL;
		else
			templt = (char *)SvPV(ST(2),PL_na);
	}
;
#line 2463 "CFITSIO.xs"
		RETVAL = fits_get_colnum(fptr,casesen,templt,&colnum,&status);
		if (ST(3) != &PL_sv_undef) sv_setiv(ST(3),colnum);
#line 4546 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtcl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtcl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, colnum, typecode, repeat, width, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	int	typecode;
	long	repeat;
	long	width;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2481 "CFITSIO.xs"
		RETVAL = ffgtcl(fptr,colnum,&typecode,&repeat,&width,&status);
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),typecode);
		if (ST(3) != &PL_sv_undef) sv_setiv(ST(3),repeat);
		if (ST(4) != &PL_sv_undef) sv_setiv(ST(4),width);
#line 4586 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtclll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtclll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, colnum, typecode, repeat, width, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	int	typecode;
	LONGLONG	repeat;
	LONGLONG	width;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2501 "CFITSIO.xs"
		RETVAL = ffgtclll(fptr,colnum,&typecode,&repeat,&width,&status);
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),typecode);
		if (ST(3) != &PL_sv_undef) sv_setiv(ST(3),repeat);
		if (ST(4) != &PL_sv_undef) sv_setiv(ST(4),width);
#line 4626 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffeqty); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffeqty)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, colnum, typecode, repeat, width, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	int	typecode;
	long	repeat;
	long	width;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2521 "CFITSIO.xs"
		RETVAL = ffeqty(fptr,colnum,&typecode,&repeat,&width,&status);
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),typecode);
		if (ST(3) != &PL_sv_undef) sv_setiv(ST(3),repeat);
		if (ST(4) != &PL_sv_undef) sv_setiv(ST(4),width);
#line 4666 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffeqtyll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffeqtyll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, colnum, typecode, repeat, width, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	int	typecode;
	LONGLONG	repeat;
	LONGLONG	width;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2541 "CFITSIO.xs"
		RETVAL = ffeqtyll(fptr,colnum,&typecode,&repeat,&width,&status);
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),typecode);
		if (ST(3) != &PL_sv_undef) sv_setiv(ST(3),repeat);
		if (ST(4) != &PL_sv_undef) sv_setiv(ST(4),width);
#line 4706 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_get_compression_type); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_get_compression_type)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, comptype, status");
    {
	fitsfile *	fptr;
	int	comptype;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = fits_get_compression_type(fptr, &comptype, &status);
	sv_setiv(ST(1), (IV)comptype);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgerr); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgerr)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "status, err_text");
    {
	int	status = (int)SvIV(ST(0))
;
	char *	err_text;
#line 2567 "CFITSIO.xs"
		err_text = get_mortalspace(FLEN_ERRMSG,TBYTE);
		ffgerr(status,err_text);
#line 4764 "CFITSIO.c"
	if (err_text != NULL)
		sv_setpv((SV *)ST(1), err_text);
	SvSETMAGIC(ST(1));
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghps); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghps)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keysexist, keynum, status");
    {
	fitsfile *	fptr;
	int	keysexist;
	int	keynum;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2582 "CFITSIO.xs"
		RETVAL = ffghps(fptr,&keysexist,&keynum,&status);
		if (ST(1) != &PL_sv_undef) sv_setiv(ST(1),keysexist); /* value-added */
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),keynum); /* value-added */
#line 4799 "CFITSIO.c"
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghsp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghsp)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keysexist, morekeys, status");
    {
	fitsfile *	fptr;
	int	keysexist;
	int	morekeys;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2599 "CFITSIO.xs"
		RETVAL = ffghsp(fptr,&keysexist,&morekeys,&status);
		if (ST(1) != &PL_sv_undef) sv_setiv(ST(1),keysexist); /* value-added */
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),morekeys); /* value-added */
#line 4835 "CFITSIO.c"
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghdn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghdn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "fptr, hdunum");
    {
	fitsfile *	fptr;
	int	hdunum;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2614 "CFITSIO.xs"
		RETVAL = ffghdn(fptr,&hdunum);
		if (ST(1) != &PL_sv_undef) sv_setiv(ST(1),hdunum);
#line 4867 "CFITSIO.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghdt); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghdt)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, hdutype, status");
    {
	fitsfile *	fptr;
	int	hdutype;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffghdt(fptr, &hdutype, &status);
	sv_setiv(ST(1), (IV)hdutype);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghad); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghad)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, headstart, datastart, dataend, status");
    {
	fitsfile *	fptr;
	long	headstart;
	long	datastart;
	long	dataend;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2642 "CFITSIO.xs"
		RETVAL = ffghad(fptr,&headstart,&datastart,&dataend,&status);
		if (ST(1) != &PL_sv_undef) sv_setiv(ST(1),headstart);
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),datastart);
		if (ST(3) != &PL_sv_undef) sv_setiv(ST(3),dataend);
#line 4937 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghadll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghadll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, headstart, datastart, dataend, status");
    {
	fitsfile *	fptr;
	LONGLONG	headstart;
	LONGLONG	datastart;
	LONGLONG	dataend;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2661 "CFITSIO.xs"
		RETVAL = ffghadll(fptr,&headstart,&datastart,&dataend,&status);
		if (ST(1) != &PL_sv_undef) sv_setiv(ST(1),headstart);
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),datastart);
		if (ST(3) != &PL_sv_undef) sv_setiv(ST(3),dataend);
#line 4975 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghof); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghof)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, headstart, datastart, dataend, status");
    {
	fitsfile *	fptr;
	OFF_T	headstart;
	OFF_T	datastart;
	OFF_T	dataend;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2680 "CFITSIO.xs"
		RETVAL = ffghof(fptr,&headstart,&datastart,&dataend,&status);
		if (ST(1) != &PL_sv_undef) sv_setuv(ST(1),headstart);
		if (ST(2) != &PL_sv_undef) sv_setuv(ST(2),datastart);
		if (ST(3) != &PL_sv_undef) sv_setuv(ST(3),dataend);
#line 5013 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgknm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgknm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "card, name, len, status");
    {
	char *	card;
	char *	name;
	int	len;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			card = (char *)NULL;
		else
			card = (char *)SvPV(ST(0),PL_na);
	}
;
#line 2698 "CFITSIO.xs"
		name = get_mortalspace(FLEN_KEYWORD,TBYTE);
		RETVAL = ffgknm(card,name,&len,&status);
		if (ST(2) != &PL_sv_undef)
			sv_setiv(ST(2), len);
#line 5051 "CFITSIO.c"
	if (name != NULL)
		sv_setpv((SV *)ST(1), name);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdtyp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdtyp)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "value, dtype, status");
    {
	char *	value;
	char	dtype;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			value = (char *)NULL;
		else
			value = (char *)SvPV(ST(0),PL_na);
	}
;

	RETVAL = ffdtyp(value, &dtype, &status);
	sv_setpvn(ST(1), (char *)&dtype, 1);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgidt); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgidt)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, bitpix, status");
    {
	fitsfile *	fptr;
	int	bitpix;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffgidt(fptr, &bitpix, &status);
	sv_setiv(ST(1), (IV)bitpix);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffinttyp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffinttyp)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "value, inttype, neg, status");
    {
	char *	value;
	int	inttype;
	int	neg;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			value = (char *)NULL;
		else
			value = (char *)SvPV(ST(0),PL_na);
	}
;

	RETVAL = ffinttyp(value, &inttype, &neg, &status);
	sv_setiv(ST(1), (IV)inttype);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)neg);
	SvSETMAGIC(ST(2));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgiet); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgiet)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, bitpix, status");
    {
	fitsfile *	fptr;
	int	bitpix;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffgiet(fptr, &bitpix, &status);
	sv_setiv(ST(1), (IV)bitpix);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgidm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgidm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, naxis, status");
    {
	fitsfile *	fptr;
	int	naxis;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffgidm(fptr, &naxis, &status);
	sv_setiv(ST(1), (IV)naxis);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgisz); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgisz)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, naxes, status");
    {
	FitsFile *	fptr;
	long *	naxes;
	int	status = (int)SvIV(ST(2))
;
#line 2776 "CFITSIO.xs"
		int nlen;
#line 5253 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2778 "CFITSIO.xs"
		RETVAL = ffgidm(fptr->fptr,&nlen,&status);
		if (RETVAL <= 0) {
			naxes = get_mortalspace(nlen,TLONG);
			RETVAL = ffgisz(fptr->fptr,nlen,naxes,&status);
			/* unpack as Perl array */
			unpack1D(ST(1),naxes,nlen,TLONG,1);
		}
#line 5271 "CFITSIO.c"
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgiszll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgiszll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, naxes, status");
    {
	FitsFile *	fptr;
	LONGLONG *	naxes;
	int	status = (int)SvIV(ST(2))
;
#line 2798 "CFITSIO.xs"
		int nlen;
#line 5295 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2800 "CFITSIO.xs"
		RETVAL = ffgidm(fptr->fptr,&nlen,&status);
		if (RETVAL <= 0) {
			naxes = get_mortalspace(nlen,TLONGLONG);
			RETVAL = ffgiszll(fptr->fptr,nlen,naxes,&status);
			/* unpack as Perl array */
			unpack1D(ST(1),naxes,nlen,TLONGLONG,1);
		}
#line 5313 "CFITSIO.c"
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_get_noise_bits); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_get_noise_bits)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, noisebits, status");
    {
	fitsfile *	fptr;
	int	noisebits;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = fits_get_noise_bits(fptr, &noisebits, &status);
	sv_setiv(ST(1), (IV)noisebits);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgncl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgncl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, ncols, status");
    {
	fitsfile *	fptr;
	int	ncols;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffgncl(fptr, &ncols, &status);
	sv_setiv(ST(1), (IV)ncols);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgmng); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgmng)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "mfptr, nmembers, status");
    {
	fitsfile *	mfptr;
	long	nmembers;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    mfptr = fitsfileSV(ST(0));
        }
        else
            croak("mfptr is not of type fitsfilePtr")
;

	RETVAL = ffgmng(mfptr, &nmembers, &status);
	sv_setiv(ST(1), (IV)nmembers);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffthdu); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffthdu)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, hdunum, status");
    {
	fitsfile *	fptr;
	int	hdunum;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffthdu(fptr, &hdunum, &status);
	sv_setiv(ST(1), (IV)hdunum);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtnm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtnm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "gfptr, nmembers, status");
    {
	fitsfile *	gfptr;
	long	nmembers;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    gfptr = fitsfileSV(ST(0));
        }
        else
            croak("gfptr is not of type fitsfilePtr")
;

	RETVAL = ffgtnm(gfptr, &nmembers, &status);
	sv_setiv(ST(1), (IV)nmembers);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgnrw); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgnrw)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, nrows, status");
    {
	fitsfile *	fptr;
	long	nrows;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffgnrw(fptr, &nrows, &status);
	sv_setiv(ST(1), (IV)nrows);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgnrwll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgnrwll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, nrows, status");
    {
	fitsfile *	fptr;
	LONGLONG	nrows;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffgnrwll(fptr, &nrows, &status);
	sv_setiv(ST(1), (IV)nrows);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgrsz); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgrsz)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, nrows, status");
    {
	fitsfile *	fptr;
	long	nrows;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffgrsz(fptr, &nrows, &status);
	sv_setiv(ST(1), (IV)nrows);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgstm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgstm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "timestr, timeref, status");
    {
	char *	timestr;
	int	timeref;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;
#line 2914 "CFITSIO.xs"
		timestr = get_mortalspace(20,TBYTE); /* YYYY-MM-DDThh:mm:ss */
		RETVAL=ffgstm(timestr,&timeref,&status);
		if (ST(1) != &PL_sv_undef) sv_setiv(ST(1),timeref);
#line 5613 "CFITSIO.c"
	if (timestr != NULL)
		sv_setpv((SV *)ST(0), timestr);
	SvSETMAGIC(ST(0));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgabc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgabc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "tfields, tform, space, rowlen, tbcol, status");
    {
	int	tfields = (int)SvIV(ST(0))
;
	char **	tform = (char **)packND(ST(1),TSTRING)
;
	int	space = (int)SvIV(ST(2))
;
	long	rowlen;
	long *	tbcol;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;
#line 2933 "CFITSIO.xs"
		tbcol = get_mortalspace(tfields,TLONG);
		RETVAL=ffgabc(tfields,tform,space,&rowlen,tbcol,&status);
		unpack1D(ST(4),tbcol,tfields,TLONG,-1);
		if (ST(3) != &PL_sv_undef) sv_setiv(ST(3),rowlen); /* value-added */
#line 5651 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_get_tile_dim); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_get_tile_dim)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, ndim, tilesize, status");
    {
	FitsFile *	fptr;
	int	ndim = (int)SvIV(ST(1))
;
	long *	naxes;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2950 "CFITSIO.xs"
		naxes = get_mortalspace(ndim,TLONG);
		RETVAL=fits_get_tile_dim(fptr->fptr,ndim,naxes,&status);
		if (ST(2)!=&PL_sv_undef) unpack1D(ST(2),naxes,ndim,TLONG,fptr->perlyunpacking);
#line 5688 "CFITSIO.c"
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffvers); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffvers)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "version");
    {
	float	version;
	float	RETVAL;
	dXSTARG;
#line 2963 "CFITSIO.xs"
		RETVAL = ffvers(&version);
		if (ST(0) != &PL_sv_undef) sv_setnv(ST(0),version); /* value-added */
#line 5712 "CFITSIO.c"
	XSprePUSH;
	PUSHn((double) RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffhdr2str); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffhdr2str)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, nocomments, header, nkeys, status");
    {
	FitsFile *	fptr;
	int	nocomments = (int)SvIV(ST(1))
;
	char *	header;
	int	nkeys;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2979 "CFITSIO.xs"
		RETVAL=fits_hdr2str(fptr->fptr,nocomments,NULL,0,&header,&nkeys,&status);
		if (ST(2)!=&PL_sv_undef) unpackScalar(ST(2), header, TSTRING);
		if (ST(3)!=&PL_sv_undef) unpackScalar(ST(3), &nkeys, TINT);
		free(header);
#line 5749 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcnvthdr2str); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffcnvthdr2str)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, nocomments, header, nkeys, status");
    {
	FitsFile *	fptr;
	int	nocomments = (int)SvIV(ST(1))
;
	char *	header;
	int	nkeys;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 2998 "CFITSIO.xs"
		RETVAL=fits_hdr2str(fptr->fptr,nocomments,NULL,0,&header,&nkeys,&status);
		if (ST(2)!=&PL_sv_undef) unpackScalar(ST(2), header, TSTRING);
		if (ST(3)!=&PL_sv_undef) unpackScalar(ST(3), &nkeys, TINT);
		free(header);
#line 5788 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffitab); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffitab)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 10)
       croak_xs_usage(cv,  "fptr, rowlen, nrows, tfields, ttype, tbcol, tform, tunit, extname, status");
    {
	fitsfile *	fptr;
	LONGLONG	rowlen = (LONGLONG)SvIV(ST(1))
;
	LONGLONG	nrows = (LONGLONG)SvIV(ST(2))
;
	int	tfields = (int)SvIV(ST(3))
;
	char **	ttype = (char **)packND(ST(4),TSTRING)
;
	long *	tbcol = (long *)packND(ST(5),TLONG)
;
	char **	tform = (char **)packND(ST(6),TSTRING)
;
	char **	tunit = (char **)packND(ST(7),TSTRING)
;
	char *	extname;
	int	status = (int)SvIV(ST(9))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(8) == &PL_sv_undef)
			extname = (char *)NULL;
		else
			extname = (char *)SvPV(ST(8),PL_na);
	}
;

	RETVAL = ffitab(fptr, rowlen, nrows, tfields, ttype, tbcol, tform, tunit, extname, &status);
	sv_setiv(ST(9), (IV)status);
	SvSETMAGIC(ST(9));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffibin); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffibin)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, nrows, tfields, ttype, tform, tunit, extname, pcount, status");
    {
	fitsfile *	fptr;
	LONGLONG	nrows = (LONGLONG)SvIV(ST(1))
;
	int	tfields = (int)SvIV(ST(2))
;
	char **	ttype = (char **)packND(ST(3),TSTRING)
;
	char **	tform = (char **)packND(ST(4),TSTRING)
;
	char **	tunit = (char **)packND(ST(5),TSTRING)
;
	char *	extname;
	LONGLONG	pcount = (LONGLONG)SvIV(ST(7))
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(6) == &PL_sv_undef)
			extname = (char *)NULL;
		else
			extname = (char *)SvPV(ST(6),PL_na);
	}
;

	RETVAL = ffibin(fptr, nrows, tfields, ttype, tform, tunit, extname, pcount, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fficol); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fficol)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, colnum, ttype, tform, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	char *	ttype;
	char *	tform;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(2) == &PL_sv_undef)
			ttype = (char *)NULL;
		else
			ttype = (char *)SvPV(ST(2),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			tform = (char *)NULL;
		else
			tform = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = fficol(fptr, colnum, ttype, tform, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fficls); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fficls)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, colnum, ncols, ttype, tform, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	int	ncols = (int)SvIV(ST(2))
;
	char **	ttype = (char **)packND(ST(3),TSTRING)
;
	char **	tform = (char **)packND(ST(4),TSTRING)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = fficls(fptr, colnum, ncols, ttype, tform, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtis); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtis)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, grpname, grouptype, status");
    {
	fitsfile *	fptr;
	char *	grpname;
	int	grouptype = (int)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			grpname = (char *)NULL;
		else
			grpname = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffgtis(fptr, grpname, grouptype, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffiimg); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffiimg)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, bitpix, naxis, naxes, status");
    {
	fitsfile *	fptr;
	int	bitpix = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffiimg(fptr, bitpix, naxis, naxes, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffiimgll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffiimgll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, bitpix, naxis, naxes, status");
    {
	fitsfile *	fptr;
	int	bitpix = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	LONGLONG *	naxes = (LONGLONG *)packND(ST(3),TLONGLONG)
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffiimgll(fptr, bitpix, naxis, naxes, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikyu); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikyu)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keyname, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	comment;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = ffikyu(fptr, keyname, comment, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikys); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikys)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	value;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			value = (char *)NULL;
		else
			value = (char *)SvPV(ST(2),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffikys(fptr, keyname, value, comment, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikyl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikyl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	int	value = (int)SvIV(ST(2))
;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffikyl(fptr, keyname, value, comment, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikyj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikyj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	LONGLONG	value = (LONGLONG)SvIV(ST(2))
;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffikyj(fptr, keyname, value, comment, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikye); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikye)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float	value = (float)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffikye(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikyf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikyf)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float	value = (float)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffikyf(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikyd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikyd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double	value = (double)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffikyd(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikyg); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikyg)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double	value = (double)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffikyg(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikyc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikyc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float *	value = (float *)packND(ST(2),TFLOAT)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffikyc(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikfc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikfc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float *	value = (float *)packND(ST(2),TFLOAT)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffikfc(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikym); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikym)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double *	value = (double *)packND(ST(2),TDOUBLE)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffikym(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikfm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikfm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double *	value = (double *)packND(ST(2),TDOUBLE)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffikfm(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffirec); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffirec)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keynum, card, status");
    {
	fitsfile *	fptr;
	int	keynum = (int)SvIV(ST(1))
;
	char *	card;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(2) == &PL_sv_undef)
			card = (char *)NULL;
		else
			card = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = ffirec(fptr, keynum, card, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikey); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikey)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, card, status");
    {
	fitsfile *	fptr;
	char *	card;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			card = (char *)NULL;
		else
			card = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffikey(fptr, card, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffirow); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffirow)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, firstrow, nrows, status");
    {
	fitsfile *	fptr;
	LONGLONG	firstrow = (LONGLONG)SvIV(ST(1))
;
	LONGLONG	nrows = (LONGLONG)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffirow(fptr, firstrow, nrows, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffkeyn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffkeyn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "keyroot, value, keyname, status");
    {
	char *	keyroot;
	int	value = (int)SvIV(ST(1))
;
	char *	keyname;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			keyroot = (char *)NULL;
		else
			keyroot = (char *)SvPV(ST(0),PL_na);
	}
;
#line 3313 "CFITSIO.xs"
		keyname = get_mortalspace(FLEN_KEYWORD,TBYTE);
		RETVAL=ffkeyn(keyroot,value,keyname,&status);
#line 6887 "CFITSIO.c"
	if (keyname != NULL)
		sv_setpv((SV *)ST(2), keyname);
	SvSETMAGIC(ST(2));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffnkey); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffnkey)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "value, keyroot, keyname, status");
    {
	int	value = (int)SvIV(ST(0))
;
	char *	keyroot;
	char *	keyname;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(1) == &PL_sv_undef)
			keyroot = (char *)NULL;
		else
			keyroot = (char *)SvPV(ST(1),PL_na);
	}
;
#line 3329 "CFITSIO.xs"
		keyname = get_mortalspace(FLEN_KEYWORD,TBYTE);
		RETVAL=ffnkey(value,keyroot,keyname,&status);
#line 6927 "CFITSIO.c"
	if (keyname != NULL)
		sv_setpv((SV *)ST(2), keyname);
	SvSETMAGIC(ST(2));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkky); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkky)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "keyname, value, comm, card, status");
    {
	const char *	keyname = (const char *)SvPV_nolen(ST(0))
;
	char *	value;
	const char *	comm = (const char *)SvPV_nolen(ST(2))
;
	char *	card;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(1) == &PL_sv_undef)
			value = (char *)NULL;
		else
			value = (char *)SvPV(ST(1),PL_na);
	}
;
#line 3346 "CFITSIO.xs"
		card = get_mortalspace(FLEN_CARD, TBYTE);
		RETVAL=ffmkky(keyname, value, comm, card, &status);
#line 6969 "CFITSIO.c"
	if (card != NULL)
		sv_setpv((SV *)ST(3), card);
	SvSETMAGIC(ST(3));
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtmg); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtmg)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "infptr, outfptr, mgopt, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	int	mgopt = (int)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	RETVAL = ffgtmg(infptr, outfptr, mgopt, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmbyt); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmbyt)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, bytepos, err_mode, status");
    {
	fitsfile *	fptr;
	LONGLONG	bytepos = (LONGLONG)SvIV(ST(1))
;
	int	err_mode = (int)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffmbyt(fptr, bytepos, err_mode, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmcrd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmcrd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keyname, card, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	card;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			card = (char *)NULL;
		else
			card = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = ffmcrd(fptr, keyname, card, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmcom); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmcom)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keyname, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	comment;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = ffmcom(fptr, keyname, comment, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkyu); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkyu)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keyname, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	comment;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = ffmkyu(fptr, keyname, comment, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkys); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkys)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	value;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			value = (char *)NULL;
		else
			value = (char *)SvPV(ST(2),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffmkys(fptr, keyname, value, comment, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkyl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkyl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	int	value = (int)SvIV(ST(2))
;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffmkyl(fptr, keyname, value, comment, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkyj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkyj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	LONGLONG	value = (LONGLONG)SvIV(ST(2))
;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffmkyj(fptr, keyname, value, comment, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkye); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkye)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float	value = (float)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffmkye(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkyf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkyf)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float	value = (float)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffmkyf(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkyd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkyd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double	value = (double)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffmkyd(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkyg); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkyg)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double	value = (double)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffmkyg(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkyc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkyc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float *	value = (float *)packND(ST(2),TFLOAT)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffmkyc(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkfc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkfc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float *	value = (float *)packND(ST(2),TFLOAT)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffmkfc(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkym); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkym)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double *	value = (double *)packND(ST(2),TDOUBLE)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffmkym(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkfm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkfm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double *	value = (double *)packND(ST(2),TDOUBLE)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffmkfm(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmnam); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmnam)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, oldname, newname, status");
    {
	fitsfile *	fptr;
	char *	oldname;
	char *	newname;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			oldname = (char *)NULL;
		else
			oldname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			newname = (char *)NULL;
		else
			newname = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = ffmnam(fptr, oldname, newname, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmrec); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmrec)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keynum, card, status");
    {
	fitsfile *	fptr;
	int	keynum = (int)SvIV(ST(1))
;
	char *	card;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(2) == &PL_sv_undef)
			card = (char *)NULL;
		else
			card = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = ffmrec(fptr, keynum, card, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmvec); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmvec)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, colnum, newveclen, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	newveclen = (LONGLONG)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffmvec(fptr, colnum, newveclen, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmahd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmahd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, hdunum, hdutype, status");
    {
	fitsfile *	fptr;
	int	hdunum = (int)SvIV(ST(1))
;
	int	hdutype;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 3610 "CFITSIO.xs"
		RETVAL = ffmahd(fptr,hdunum,&hdutype,&status);
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),hdutype);
#line 7941 "CFITSIO.c"
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmnhd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmnhd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, hdutype, extname, extvers, status");
    {
	fitsfile *	fptr;
	int	hdutype = (int)SvIV(ST(1))
;
	char *	extname;
	int	extvers = (int)SvIV(ST(3))
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(2) == &PL_sv_undef)
			extname = (char *)NULL;
		else
			extname = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = ffmnhd(fptr, hdutype, extname, extvers, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmrhd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmrhd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, nmove, hdutype, status");
    {
	fitsfile *	fptr;
	int	nmove = (int)SvIV(ST(1))
;
	int	hdutype;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 3639 "CFITSIO.xs"
		RETVAL = ffmrhd(fptr,nmove,&hdutype,&status);
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),hdutype);
#line 8021 "CFITSIO.c"
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffnchk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffnchk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "fptr, status");
    {
	fitsfile *	fptr;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffnchk(fptr, &status);
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_open_file); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_open_file)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "filename, iomode, status");
    {
	char *	filename;
	int	iomode = (int)SvIV(ST(1))
;
	int	status = (int)SvIV(ST(2))
;
#line 3666 "CFITSIO.xs"
		FitsFile * fptr;
		static int (*fits_open[5])(fitsfile **, const char *, int , int *) = { ffopen, ffdkopn, ffdopn, ffiopn, fftopn };
#line 8078 "CFITSIO.c"
	FitsFile *	RETVAL;

	{
		if (ST(0) == &PL_sv_undef)
			filename = (char *)NULL;
		else
			filename = (char *)SvPV(ST(0),PL_na);
	}
;
#line 3669 "CFITSIO.xs"
		if (!filename) /* undef passed */
			filename = "";
		NewFitsFile(fptr);
		if (fits_open[ix](&(fptr->fptr),filename,iomode,&status))
		   AbortFitsFile(fptr);
		RETVAL = fptr;
#line 8095 "CFITSIO.c"
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    if (RETVAL != NULL)
		    sv_setref_pv(RETVALSV, "fitsfilePtr", (void*)RETVAL);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffopen); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffopen)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, filename, iomode, status");
    {
	FitsFile *	fptr;
	char *	filename;
	int	iomode = (int)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(1) == &PL_sv_undef)
			filename = (char *)NULL;
		else
			filename = (char *)SvPV(ST(1),PL_na);
	}
;
#line 3688 "CFITSIO.xs"
		if (!filename) /* undef passed */
			filename = "";
		NewFitsFile(fptr);
		RETVAL = ffopen(&(fptr->fptr),filename,iomode,&status);
		if (RETVAL)
		   AbortFitsFile(fptr);
#line 8141 "CFITSIO.c"
	if (fptr != NULL)
	        sv_setref_pv(ST(0), "fitsfilePtr", (void*)fptr);
	SvSETMAGIC(ST(0));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdkopn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdkopn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, filename, iomode, status");
    {
	FitsFile *	fptr;
	char *	filename;
	int	iomode = (int)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(1) == &PL_sv_undef)
			filename = (char *)NULL;
		else
			filename = (char *)SvPV(ST(1),PL_na);
	}
;
#line 3708 "CFITSIO.xs"
		if (!filename) /* undef passed */
			filename = "";
		NewFitsFile(fptr);
		RETVAL = ffdkopn(&(fptr->fptr),filename,iomode,&status);
		if (RETVAL)
		   AbortFitsFile(fptr);
#line 8185 "CFITSIO.c"
	if (fptr != NULL)
	        sv_setref_pv(ST(0), "fitsfilePtr", (void*)fptr);
	SvSETMAGIC(ST(0));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdopn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdopn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, filename, iomode, status");
    {
	FitsFile *	fptr;
	char *	filename;
	int	iomode = (int)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(1) == &PL_sv_undef)
			filename = (char *)NULL;
		else
			filename = (char *)SvPV(ST(1),PL_na);
	}
;
#line 3728 "CFITSIO.xs"
		if (!filename) /* undef passed */
			filename = "";
		NewFitsFile(fptr);
		RETVAL = ffdopn(&(fptr->fptr),filename,iomode,&status);
		if (RETVAL)
		   AbortFitsFile(fptr);
#line 8229 "CFITSIO.c"
	if (fptr != NULL)
	        sv_setref_pv(ST(0), "fitsfilePtr", (void*)fptr);
	SvSETMAGIC(ST(0));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffiopn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffiopn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, filename, iomode, status");
    {
	FitsFile *	fptr;
	char *	filename;
	int	iomode = (int)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(1) == &PL_sv_undef)
			filename = (char *)NULL;
		else
			filename = (char *)SvPV(ST(1),PL_na);
	}
;
#line 3748 "CFITSIO.xs"
		if (!filename) /* undef passed */
			filename = "";
		NewFitsFile(fptr);
		RETVAL = ffiopn(&(fptr->fptr),filename,iomode,&status);
		if (RETVAL)
		   AbortFitsFile(fptr);
#line 8273 "CFITSIO.c"
	if (fptr != NULL)
	        sv_setref_pv(ST(0), "fitsfilePtr", (void*)fptr);
	SvSETMAGIC(ST(0));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fftopn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fftopn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, filename, iomode, status");
    {
	FitsFile *	fptr;
	char *	filename;
	int	iomode = (int)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(1) == &PL_sv_undef)
			filename = (char *)NULL;
		else
			filename = (char *)SvPV(ST(1),PL_na);
	}
;
#line 3768 "CFITSIO.xs"
		if (!filename) /* undef passed */
			filename = "";
		NewFitsFile(fptr);
		RETVAL = fftopn(&(fptr->fptr),filename,iomode,&status);
		if (RETVAL)
		   AbortFitsFile(fptr);
#line 8317 "CFITSIO.c"
	if (fptr != NULL)
	        sv_setref_pv(ST(0), "fitsfilePtr", (void*)fptr);
	SvSETMAGIC(ST(0));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#if (CFITSIO_MAJOR > 2 && (CFITSIO_MINOR > 36))
#define XSubPPtmpAAAB 1


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffeopn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffeopn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, filename, iomode, extlist, hdutype, status");
    {
	FitsFile *	fptr;
	char *	filename;
	int	iomode = (int)SvIV(ST(2))
;
	char *	extlist;
	int	hdutype;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(1) == &PL_sv_undef)
			filename = (char *)NULL;
		else
			filename = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			extlist = (char *)NULL;
		else
			extlist = (char *)SvPV(ST(3),PL_na);
	}
;
#line 3792 "CFITSIO.xs"
		if (!filename) /* undef passed */
			filename = "";
		NewFitsFile(fptr);
		RETVAL = ffeopn(&(fptr->fptr),filename,iomode,extlist,&hdutype,&status);
		if (ST(3) != &PL_sv_undef) sv_setiv(ST(3),hdutype);
		if (RETVAL)
		   AbortFitsFile(fptr);
#line 8375 "CFITSIO.c"
	if (fptr != NULL)
	        sv_setref_pv(ST(0), "fitsfilePtr", (void*)fptr);
	SvSETMAGIC(ST(0));
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtop); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtop)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "mfptr, group, gfptr, status");
    {
	fitsfile *	mfptr;
	int	group = (int)SvIV(ST(1))
;
	FitsFile *	gfptr;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    mfptr = fitsfileSV(ST(0));
        }
        else
            croak("mfptr is not of type fitsfilePtr")
;
#line 3816 "CFITSIO.xs"
		NewFitsFile(gfptr);
		RETVAL = ffgtop(mfptr,group,&(gfptr->fptr),&status);
		if (RETVAL)
		   AbortFitsFile(gfptr);
#line 8417 "CFITSIO.c"
	if (gfptr != NULL)
	        sv_setref_pv(ST(2), "fitsfilePtr", (void*)gfptr);
	SvSETMAGIC(ST(2));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgmop); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgmop)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "gfptr, member, mfptr, status");
    {
	fitsfile *	gfptr;
	long	member = (long)SvIV(ST(1))
;
	FitsFile *	mfptr;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    gfptr = fitsfileSV(ST(0));
        }
        else
            croak("gfptr is not of type fitsfilePtr")
;
#line 3835 "CFITSIO.xs"
		NewFitsFile(mfptr);
		RETVAL = ffgmop(gfptr,member,&(mfptr->fptr),&status);
		if (RETVAL)
		   AbortFitsFile(mfptr);
#line 8458 "CFITSIO.c"
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	if (mfptr != NULL)
	        sv_setref_pv(ST(2), "fitsfilePtr", (void*)mfptr);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffextn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffextn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "filename, hdunum, status");
    {
	char *	filename;
	int	hdunum;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			filename = (char *)NULL;
		else
			filename = (char *)SvPV(ST(0),PL_na);
	}
;

	RETVAL = ffextn(filename, &hdunum, &status);
	sv_setiv(ST(1), (IV)hdunum);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffiurl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffiurl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "filename, urltype, infile, outfile, extspec, filter, binspec, colspec, status");
    {
	char *	filename;
	char *	urltype;
	char *	infile;
	char *	outfile;
	char *	extspec;
	char *	filter;
	char *	binspec;
	char *	colspec;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			filename = (char *)NULL;
		else
			filename = (char *)SvPV(ST(0),PL_na);
	}
;
#line 3869 "CFITSIO.xs"
		urltype = get_mortalspace(FLEN_FILENAME,TBYTE);
		infile = get_mortalspace(FLEN_FILENAME,TBYTE);
		outfile = get_mortalspace(FLEN_FILENAME,TBYTE);
		extspec = get_mortalspace(FLEN_FILENAME,TBYTE);
		filter = get_mortalspace(FLEN_FILENAME,TBYTE);
		binspec = get_mortalspace(FLEN_FILENAME,TBYTE);
		colspec = get_mortalspace(FLEN_FILENAME,TBYTE);
		RETVAL = ffiurl(filename,urltype,infile,outfile,extspec,filter,binspec,colspec,&status);
#line 8543 "CFITSIO.c"
	if (urltype != NULL)
		sv_setpv((SV *)ST(1), urltype);
	SvSETMAGIC(ST(1));
	if (infile != NULL)
		sv_setpv((SV *)ST(2), infile);
	SvSETMAGIC(ST(2));
	if (outfile != NULL)
		sv_setpv((SV *)ST(3), outfile);
	SvSETMAGIC(ST(3));
	if (extspec != NULL)
		sv_setpv((SV *)ST(4), extspec);
	SvSETMAGIC(ST(4));
	if (filter != NULL)
		sv_setpv((SV *)ST(5), filter);
	SvSETMAGIC(ST(5));
	if (binspec != NULL)
		sv_setpv((SV *)ST(6), binspec);
	SvSETMAGIC(ST(6));
	if (colspec != NULL)
		sv_setpv((SV *)ST(7), colspec);
	SvSETMAGIC(ST(7));
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffifile); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffifile)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 10)
       croak_xs_usage(cv,  "filename, filetype, infile, outfile, extspec, filter, binspec, colspec, pixspec, status");
    {
	char *	filename;
	char *	filetype;
	char *	infile;
	char *	outfile;
	char *	extspec;
	char *	filter;
	char *	binspec;
	char *	colspec;
	char *	pixspec;
	int	status = (int)SvIV(ST(9))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			filename = (char *)NULL;
		else
			filename = (char *)SvPV(ST(0),PL_na);
	}
;
#line 3903 "CFITSIO.xs"
		filetype = get_mortalspace(FLEN_FILENAME,TBYTE);
		infile = get_mortalspace(FLEN_FILENAME,TBYTE);
		outfile = get_mortalspace(FLEN_FILENAME,TBYTE);
		extspec = get_mortalspace(FLEN_FILENAME,TBYTE);
		filter = get_mortalspace(FLEN_FILENAME,TBYTE);
		binspec = get_mortalspace(FLEN_FILENAME,TBYTE);
		colspec = get_mortalspace(FLEN_FILENAME,TBYTE);
		pixspec = get_mortalspace(FLEN_FILENAME,TBYTE);
		RETVAL = ffifile(filename,filetype,infile,outfile,extspec,filter,binspec,colspec,pixspec,&status);
#line 8613 "CFITSIO.c"
	if (filetype != NULL)
		sv_setpv((SV *)ST(1), filetype);
	SvSETMAGIC(ST(1));
	if (infile != NULL)
		sv_setpv((SV *)ST(2), infile);
	SvSETMAGIC(ST(2));
	if (outfile != NULL)
		sv_setpv((SV *)ST(3), outfile);
	SvSETMAGIC(ST(3));
	if (extspec != NULL)
		sv_setpv((SV *)ST(4), extspec);
	SvSETMAGIC(ST(4));
	if (filter != NULL)
		sv_setpv((SV *)ST(5), filter);
	SvSETMAGIC(ST(5));
	if (binspec != NULL)
		sv_setpv((SV *)ST(6), binspec);
	SvSETMAGIC(ST(6));
	if (colspec != NULL)
		sv_setpv((SV *)ST(7), colspec);
	SvSETMAGIC(ST(7));
	if (pixspec != NULL)
		sv_setpv((SV *)ST(8), pixspec);
	SvSETMAGIC(ST(8));
	sv_setiv(ST(9), (IV)status);
	SvSETMAGIC(ST(9));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_copy_cell2image); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_copy_cell2image)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "infptr, outfptr, colname, rownum, status");
    {
	fitsfile*	infptr;
	fitsfile*	outfptr;
	char*	colname;
	long	rownum = (long)SvIV(ST(3))
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	{
		if (ST(2) == &PL_sv_undef)
			colname = (char *)NULL;
		else
			colname = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = fits_copy_cell2image(infptr, outfptr, colname, rownum, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_copy_image2cell); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_copy_image2cell)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "infptr, outfptr, colname, rownum, copykeyflag, status");
    {
	fitsfile*	infptr;
	fitsfile*	outfptr;
	char*	colname;
	long	rownum = (long)SvIV(ST(3))
;
	int	copykeyflag = (int)SvIV(ST(4))
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	{
		if (ST(2) == &PL_sv_undef)
			colname = (char *)NULL;
		else
			colname = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = fits_copy_image2cell(infptr, outfptr, colname, rownum, copykeyflag, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffrwrg); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffrwrg)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "rowlist, maxrows, maxranges, numranges, rangemin, rangemax, status");
    {
	char *	rowlist;
	LONGLONG	maxrows = (LONGLONG)SvIV(ST(1))
;
	int	maxranges = (int)SvIV(ST(2))
;
	int	numranges;
	long *	rangemin;
	long *	rangemax;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			rowlist = (char *)NULL;
		else
			rowlist = (char *)SvPV(ST(0),PL_na);
	}
;
#line 3961 "CFITSIO.xs"
		if (ST(4)!=&PL_sv_undef || ST(5)!=&PL_sv_undef) {
			rangemin = get_mortalspace(maxranges,TLONG);
			rangemax = get_mortalspace(maxranges,TLONG);
		}
		else {
			rangemin = rangemax = 0;
			maxranges = 0;
		}

		RETVAL=ffrwrg(rowlist, maxrows, maxranges, &numranges,
			rangemin, rangemax, &status);
		if (ST(3)!=&PL_sv_undef) sv_setiv(ST(3),numranges);
		if (ST(4)!=&PL_sv_undef) unpack1D(ST(4),rangemin,numranges,TLONG,-1);
		if (ST(5)!=&PL_sv_undef) unpack1D(ST(5),rangemax,numranges,TLONG,-1);
#line 8792 "CFITSIO.c"
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffrwrgll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffrwrgll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "rowlist, maxrows, maxranges, numranges, rangemin, rangemax, status");
    {
	char *	rowlist;
	LONGLONG	maxrows = (LONGLONG)SvIV(ST(1))
;
	int	maxranges = (int)SvIV(ST(2))
;
	int	numranges;
	LONGLONG *	rangemin;
	LONGLONG *	rangemax;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			rowlist = (char *)NULL;
		else
			rowlist = (char *)SvPV(ST(0),PL_na);
	}
;
#line 3991 "CFITSIO.xs"
		if (ST(4)!=&PL_sv_undef || ST(5)!=&PL_sv_undef) {
			rangemin = get_mortalspace(maxranges,TLONG);
			rangemax = get_mortalspace(maxranges,TLONG);
		}
		else {
			rangemin = rangemax = 0;
			maxranges = 0;
		}

		RETVAL=ffrwrgll(rowlist, maxrows, maxranges, &numranges,
			rangemin, rangemax, &status);
		if (ST(3)!=&PL_sv_undef) sv_setiv(ST(3),numranges);
		if (ST(4)!=&PL_sv_undef) unpack1D(ST(4),rangemin,numranges,TLONGLONG,-1);
		if (ST(5)!=&PL_sv_undef) unpack1D(ST(5),rangemax,numranges,TLONGLONG,-1);
#line 8845 "CFITSIO.c"
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffrtnm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffrtnm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "url, rootname, status");
    {
	char *	url;
	char *	rootname;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			url = (char *)NULL;
		else
			url = (char *)SvPV(ST(0),PL_na);
	}
;
#line 4017 "CFITSIO.xs"
		rootname = get_mortalspace(FLEN_FILENAME,TBYTE);
		RETVAL = ffrtnm(url,rootname,&status);
#line 8880 "CFITSIO.c"
	if (rootname != NULL)
		sv_setpv((SV *)ST(1), rootname);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgthd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgthd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "templt, card, keytype, status");
    {
	char *	templt;
	char *	card;
	int	keytype;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			templt = (char *)NULL;
		else
			templt = (char *)SvPV(ST(0),PL_na);
	}
;
#line 4033 "CFITSIO.xs"
		card = get_mortalspace(FLEN_CARD,TBYTE);
		RETVAL = ffgthd(templt,card,&keytype,&status);
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),keytype);
#line 8920 "CFITSIO.c"
	if (card != NULL)
		sv_setpv((SV *)ST(1), card);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_translate_keyword); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_translate_keyword)
{
    dVAR; dXSARGS;
    if (items != 14)
       croak_xs_usage(cv,  "inrec, outrec, inpatterns, outpatterns, npat, n_value, n_offset, n_range, pat_num, i, j, m, n, status");
    {
	char*	inrec;
	char*	outrec;
	char**	inpatterns = (char **)packND(ST(2),TSTRING)
;
	char**	outpatterns = (char **)packND(ST(3),TSTRING)
;
	int	npat = (int)SvIV(ST(4))
;
	int	n_value = (int)SvIV(ST(5))
;
	int	n_offset = (int)SvIV(ST(6))
;
	int	n_range = (int)SvIV(ST(7))
;
	int	pat_num;
	int	i;
	int	j;
	int	m;
	int	n;
	int	status = (int)SvIV(ST(13))
;
#line 4058 "CFITSIO.xs"
		char* (*patterns)[2];
		int ii;
#line 8964 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			inrec = (char *)NULL;
		else
			inrec = (char *)SvPV(ST(0),PL_na);
	}
;
#line 4061 "CFITSIO.xs"
		patterns = malloc(npat * sizeof(*patterns));
		for (ii=0; ii<npat; ++ii) {
		    patterns[ii][0] = inpatterns[ii];
		    patterns[ii][1] = outpatterns[ii];
		}
		outrec = get_mortalspace(strlen(inrec)+1,TBYTE);
		RETVAL = fits_translate_keyword(inrec,
						outrec,
						patterns,
						npat,
						n_value,
						n_offset,
						n_range,
						&pat_num,
						&i,
						&j,
						&m,
						&n,
						&status);
		if (ST(1) != &PL_sv_undef) sv_setpv(ST(1),outrec);
		if (ST(8) != &PL_sv_undef) sv_setiv(ST(8),pat_num);
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),i);
		if (ST(10) != &PL_sv_undef) sv_setiv(ST(10),j);
		if (ST(11) != &PL_sv_undef) sv_setiv(ST(11),m);
		if (ST(12) != &PL_sv_undef) sv_setiv(ST(12),n);
		free(patterns);
#line 9002 "CFITSIO.c"
	sv_setiv(ST(13), (IV)status);
	SvSETMAGIC(ST(13));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_translate_keywords); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_translate_keywords)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 10)
       croak_xs_usage(cv,  "infptr, outfptr, firstkey, inpatterns, outpatterns, npat, n_value, n_offset, n_range, status");
    {
	FitsFile*	infptr;
	FitsFile*	outfptr;
	int	firstkey = (int)SvIV(ST(2))
;
	char**	inpatterns = (char **)packND(ST(3),TSTRING)
;
	char**	outpatterns = (char **)packND(ST(4),TSTRING)
;
	int	npat = (int)SvIV(ST(5))
;
	int	n_value = (int)SvIV(ST(6))
;
	int	n_offset = (int)SvIV(ST(7))
;
	int	n_range = (int)SvIV(ST(8))
;
	int	status = (int)SvIV(ST(9))
;
#line 4106 "CFITSIO.xs"
		char* (*patterns)[2];
		int ii;
#line 9041 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            infptr = FitsFileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
            outfptr = FitsFileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;
#line 4109 "CFITSIO.xs"
		patterns = malloc(npat * sizeof(*patterns));
		for (ii=0; ii<npat; ++ii) {
		    patterns[ii][0] = inpatterns[ii];
		    patterns[ii][1] = outpatterns[ii];
		}
		RETVAL = fits_translate_keywords(infptr->fptr,
						 outfptr->fptr,
						 firstkey,
						 patterns,
						 npat,
						 n_value,
						 n_offset,
						 n_range,
						 &status);
		free(patterns);
#line 9074 "CFITSIO.c"
	sv_setiv(ST(9), (IV)status);
	SvSETMAGIC(ST(9));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpsvc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpsvc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "card, value, comment, status");
    {
	char *	card;
	char *	value;
	char *	comment;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			card = (char *)NULL;
		else
			card = (char *)SvPV(ST(0),PL_na);
	}
;
#line 4137 "CFITSIO.xs"
		value = get_mortalspace(FLEN_VALUE,TBYTE);
		comment = get_mortalspace(FLEN_COMMENT,TBYTE);
		RETVAL = ffpsvc(card,value,comment,&status);
#line 9111 "CFITSIO.c"
	if (value != NULL)
		sv_setpv((SV *)ST(1), value);
	SvSETMAGIC(ST(1));
	if (comment != NULL)
		sv_setpv((SV *)ST(2), comment);
	SvSETMAGIC(ST(2));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffwldp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffwldp)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 13)
       croak_xs_usage(cv,  "xpix, ypix, xrefval, yrefval, xrefpix, yrefpix, xinc, yinc, rot, coordtype, xpos, ypos, status");
    {
	double	xpix = (double)SvNV(ST(0))
;
	double	ypix = (double)SvNV(ST(1))
;
	double	xrefval = (double)SvNV(ST(2))
;
	double	yrefval = (double)SvNV(ST(3))
;
	double	xrefpix = (double)SvNV(ST(4))
;
	double	yrefpix = (double)SvNV(ST(5))
;
	double	xinc = (double)SvNV(ST(6))
;
	double	yinc = (double)SvNV(ST(7))
;
	double	rot = (double)SvNV(ST(8))
;
	char *	coordtype;
	double	xpos;
	double	ypos;
	int	status = (int)SvIV(ST(12))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(9) == &PL_sv_undef)
			coordtype = (char *)NULL;
		else
			coordtype = (char *)SvPV(ST(9),PL_na);
	}
;

	RETVAL = ffwldp(xpix, ypix, xrefval, yrefval, xrefpix, yrefpix, xinc, yinc, rot, coordtype, &xpos, &ypos, &status);
	sv_setnv(ST(10), (double)xpos);
	SvSETMAGIC(ST(10));
	sv_setnv(ST(11), (double)ypos);
	SvSETMAGIC(ST(11));
	sv_setiv(ST(12), (IV)status);
	SvSETMAGIC(ST(12));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2db); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2db)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, naxis1, naxis2, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	byte	nulval = (byte)SvIV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	byte *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
#line 4183 "CFITSIO.xs"
		LONGLONG dims[2];
#line 9208 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4185 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),naxis2*dim1*sizeof_datatype(TBYTE));
			RETVAL=ffg2db(fptr->fptr,group,nulval,dim1,naxis1,naxis2,(byte*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis2; dims[1] = dim1;
			array = get_mortalspace(naxis2*dim1,TBYTE);
			RETVAL=ffg2db(fptr->fptr,group,nulval,dim1,naxis1,naxis2,array,&anynul,&status);
			unpack2D(ST(6),array,dims,TBYTE,fptr->perlyunpacking);
		}
		if (ST(7)!=&PL_sv_undef) sv_setiv(ST(7),anynul);
#line 9230 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2dsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2dsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, naxis1, naxis2, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	byte	nulval = (byte)SvIV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	signed char*	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
#line 4215 "CFITSIO.xs"
		LONGLONG dims[2];
#line 9265 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4217 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),naxis2*dim1*sizeof_datatype(TSBYTE));
			RETVAL=ffg2dsb(fptr->fptr,group,nulval,dim1,naxis1,naxis2,(signed char*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis2; dims[1] = dim1;
			array = get_mortalspace(naxis2*dim1,TSBYTE);
			RETVAL=ffg2dsb(fptr->fptr,group,nulval,dim1,naxis1,naxis2,array,&anynul,&status);
			unpack2D(ST(6),array,dims,TSBYTE,fptr->perlyunpacking);
		}
		if (ST(7)!=&PL_sv_undef) sv_setiv(ST(7),anynul);
#line 9287 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2dui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2dui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, naxis1, naxis2, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	unsigned short	nulval = (unsigned short)SvUV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	unsigned short *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
#line 4247 "CFITSIO.xs"
		LONGLONG dims[2];
#line 9322 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4249 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),naxis2*dim1*sizeof_datatype(TUSHORT));
			RETVAL=ffg2dui(fptr->fptr,group,nulval,dim1,naxis1,naxis2,(unsigned short*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis2; dims[1] = dim1;
			array = get_mortalspace(naxis2*dim1,TUSHORT);
			RETVAL=ffg2dui(fptr->fptr,group,nulval,dim1,naxis1,naxis2,array,&anynul,&status);
			unpack2D(ST(6),array,dims,TUSHORT,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 9344 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2di); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2di)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, naxis1, naxis2, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	short	nulval = (short)SvIV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	short *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
#line 4279 "CFITSIO.xs"
		LONGLONG dims[2];
#line 9379 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4281 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),naxis2*dim1*sizeof_datatype(TSHORT));
			RETVAL=ffg2di(fptr->fptr,group,nulval,dim1,naxis1,naxis2,(short*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis2; dims[1] = dim1;
			array = get_mortalspace(naxis2*dim1,TSHORT);
			RETVAL=ffg2di(fptr->fptr,group,nulval,dim1,naxis1,naxis2,array,&anynul,&status);
			unpack2D(ST(6),array,dims,TSHORT,fptr->perlyunpacking);
		}
		if (ST(7)!=&PL_sv_undef) sv_setiv(ST(7),anynul);
#line 9401 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2duk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2duk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, naxis1, naxis2, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	unsigned int	nulval = (unsigned int)SvUV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	unsigned int *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
#line 4311 "CFITSIO.xs"
		LONGLONG dims[2];
#line 9436 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4313 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),naxis2*dim1*sizeof_datatype(TUINT));
			RETVAL=ffg2duk(fptr->fptr,group,nulval,dim1,naxis1,naxis2,(unsigned int*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis2; dims[1] = dim1;
			array = get_mortalspace(naxis2*dim1,TUINT);
			RETVAL=ffg2duk(fptr->fptr,group,nulval,dim1,naxis1,naxis2,array,&anynul,&status);
			unpack2D(ST(6),array,dims,TUINT,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 9458 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2dk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2dk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, naxis1, naxis2, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	int	nulval = (int)SvIV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	int *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
#line 4343 "CFITSIO.xs"
		LONGLONG dims[2];
#line 9493 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4345 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),naxis2*dim1*sizeof_datatype(TINT));
			RETVAL=ffg2dk(fptr->fptr,group,nulval,dim1,naxis1,naxis2,(int*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis2; dims[1] = dim1;
			array = get_mortalspace(naxis2*dim1,TINT);
			RETVAL=ffg2dk(fptr->fptr,group,nulval,dim1,naxis1,naxis2,array,&anynul,&status);
			unpack2D(ST(6),array,dims,TINT,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 9515 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2duj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2duj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, naxis1, naxis2, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	unsigned long	nulval = (unsigned long)SvUV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	unsigned long *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
#line 4375 "CFITSIO.xs"
		LONGLONG dims[2];
#line 9550 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4377 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),naxis2*dim1*sizeof_datatype(TULONG));
			RETVAL=ffg2duj(fptr->fptr,group,nulval,dim1,naxis1,naxis2,(unsigned long*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis2; dims[1] = dim1;
			array = get_mortalspace(naxis2*dim1,TULONG);
			RETVAL=ffg2duj(fptr->fptr,group,nulval,dim1,naxis1,naxis2,array,&anynul,&status);
			unpack2D(ST(6),array,dims,TULONG,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 9572 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2dj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2dj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, naxis1, naxis2, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	nulval = (long)SvIV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	long *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
#line 4407 "CFITSIO.xs"
		LONGLONG dims[2];
#line 9607 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4409 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),naxis2*dim1*sizeof_datatype(TLONG));
			RETVAL=ffg2dj(fptr->fptr,group,nulval,dim1,naxis1,naxis2,(long*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis2; dims[1] = dim1;
			array = get_mortalspace(naxis2*dim1,TLONG);
			RETVAL=ffg2dj(fptr->fptr,group,nulval,dim1,naxis1,naxis2,array,&anynul,&status);
			unpack2D(ST(6),array,dims,TLONG,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 9629 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2djj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2djj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, naxis1, naxis2, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	nulval = (long)SvIV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG*	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
#line 4439 "CFITSIO.xs"
		LONGLONG dims[2];
#line 9664 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4441 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),naxis2*dim1*sizeof_datatype(TLONGLONG));
			RETVAL=ffg2djj(fptr->fptr,group,nulval,dim1,naxis1,naxis2,(LONGLONG*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis2; dims[1] = dim1;
			array = get_mortalspace(naxis2*dim1,TLONGLONG);
			RETVAL=ffg2djj(fptr->fptr,group,nulval,dim1,naxis1,naxis2,array,&anynul,&status);
			unpack2D(ST(6),array,dims,TLONGLONG,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 9686 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2de); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2de)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, naxis1, naxis2, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	float	nulval = (float)SvNV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	float *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
#line 4471 "CFITSIO.xs"
		LONGLONG dims[2];
#line 9721 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4473 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),naxis2*dim1*sizeof_datatype(TFLOAT));
			RETVAL=ffg2de(fptr->fptr,group,nulval,dim1,naxis1,naxis2,(float*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis2; dims[1] = dim1;
			array = get_mortalspace(naxis2*dim1,TFLOAT);
			RETVAL=ffg2de(fptr->fptr,group,nulval,dim1,naxis1,naxis2,array,&anynul,&status);
			unpack2D(ST(6),array,dims,TFLOAT,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 9743 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2dd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg2dd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, naxis1, naxis2, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	double	nulval = (double)SvNV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	double *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
#line 4503 "CFITSIO.xs"
		LONGLONG dims[2];
#line 9778 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4505 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),naxis2*dim1*sizeof_datatype(TDOUBLE));
			RETVAL=ffg2dd(fptr->fptr,group,nulval,dim1,naxis1,naxis2,(double*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis2; dims[1] = dim1;
			array = get_mortalspace(naxis2*dim1,TDOUBLE);
			RETVAL=ffg2dd(fptr->fptr,group,nulval,dim1,naxis1,naxis2,array,&anynul,&status);
			unpack2D(ST(6),array,dims,TDOUBLE,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 9800 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3db); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3db)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, dim2, naxis1, naxis2, naxis3, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	byte	nulval = (byte)SvIV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(6))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(7))
;
	byte *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 4537 "CFITSIO.xs"
		LONGLONG dims[3];
#line 9839 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4539 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),naxis3*dim2*dim1*sizeof_datatype(TBYTE));
			RETVAL=ffg3db(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,(byte*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis3; dims[1] = dim2; dims[2] = dim1;
			array = get_mortalspace(dim1*dim2*naxis3,TBYTE);
			RETVAL=ffg3db(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,array,&anynul,&status);
			unpack3D(ST(8),array,dims,TBYTE,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 9861 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3dsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3dsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, dim2, naxis1, naxis2, naxis3, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	signed char	nulval = (signed char)SvIV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(6))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(7))
;
	signed char*	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 4571 "CFITSIO.xs"
		LONGLONG dims[3];
#line 9900 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4573 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),naxis3*dim2*dim1*sizeof_datatype(TSBYTE));
			RETVAL=ffg3dsb(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,(signed char*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis3; dims[1] = dim2; dims[2] = dim1;
			array = get_mortalspace(dim1*dim2*naxis3,TSBYTE);
			RETVAL=ffg3dsb(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,array,&anynul,&status);
			unpack3D(ST(8),array,dims,TSBYTE,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 9922 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3dui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3dui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, dim2, naxis1, naxis2, naxis3, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	unsigned short	nulval = (unsigned short)SvUV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(6))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(7))
;
	unsigned short *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 4605 "CFITSIO.xs"
		LONGLONG dims[3];
#line 9961 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4607 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),naxis3*dim2*dim1*sizeof_datatype(TUSHORT));
			RETVAL=ffg3dui(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,(unsigned short*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis3; dims[1] = dim2; dims[2] = dim1;
			array = get_mortalspace(dim1*dim2*naxis3,TUSHORT);
			RETVAL=ffg3dui(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,array,&anynul,&status);
			unpack3D(ST(8),array,dims,TUSHORT,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 9983 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3di); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3di)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, dim2, naxis1, naxis2, naxis3, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	short	nulval = (short)SvIV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(6))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(7))
;
	short *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 4639 "CFITSIO.xs"
		LONGLONG dims[3];
#line 10022 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4641 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),naxis3*dim2*dim1*sizeof_datatype(TSHORT));
			RETVAL=ffg3di(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,(short*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis3; dims[1] = dim2; dims[2] = dim1;
			array = get_mortalspace(dim1*dim2*naxis3,TSHORT);
			RETVAL=ffg3di(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,array,&anynul,&status);
			unpack3D(ST(8),array,dims,TSHORT,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 10044 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3duk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3duk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, dim2, naxis1, naxis2, naxis3, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	unsigned int	nulval = (unsigned int)SvUV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(6))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(7))
;
	unsigned int *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 4673 "CFITSIO.xs"
		LONGLONG dims[3];
#line 10083 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4675 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),naxis3*dim2*dim1*sizeof_datatype(TUINT));
			RETVAL=ffg3duk(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,(unsigned int*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis3; dims[1] = dim2; dims[2] = dim1;
			array = get_mortalspace(dim1*dim2*naxis3,TUINT);
			RETVAL=ffg3duk(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,array,&anynul,&status);
			unpack3D(ST(8),array,dims,TUINT,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 10105 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3dk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3dk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, dim2, naxis1, naxis2, naxis3, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	int	nulval = (int)SvIV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(6))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(7))
;
	int *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 4707 "CFITSIO.xs"
		LONGLONG dims[3];
#line 10144 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4709 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),naxis3*dim2*dim1*sizeof_datatype(TINT));
			RETVAL=ffg3dk(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,(int*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis3; dims[1] = dim2; dims[2] = dim1;
			array = get_mortalspace(dim1*dim2*naxis3,TINT);
			RETVAL=ffg3dk(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,array,&anynul,&status);
			unpack3D(ST(8),array,dims,TINT,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 10166 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3duj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3duj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, dim2, naxis1, naxis2, naxis3, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	unsigned long	nulval = (unsigned long)SvUV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(6))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(7))
;
	unsigned long *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 4741 "CFITSIO.xs"
		LONGLONG dims[3];
#line 10205 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4743 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),naxis3*dim2*dim1*sizeof_datatype(TULONG));
			RETVAL=ffg3duj(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,(unsigned long*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis3; dims[1] = dim2; dims[2] = dim1;
			array = get_mortalspace(dim1*dim2*naxis3,TULONG);
			RETVAL=ffg3duj(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,array,&anynul,&status);
			unpack3D(ST(8),array,dims,TULONG,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 10227 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3dj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3dj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, dim2, naxis1, naxis2, naxis3, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	nulval = (long)SvIV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(6))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(7))
;
	long *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 4775 "CFITSIO.xs"
		LONGLONG dims[3];
#line 10266 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4777 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),naxis3*dim2*dim1*sizeof_datatype(TLONG));
			RETVAL=ffg3dj(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,(long*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis3; dims[1] = dim2; dims[2] = dim1;
			array = get_mortalspace(dim1*dim2*naxis3,TLONG);
			RETVAL=ffg3dj(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,array,&anynul,&status);
			unpack3D(ST(8),array,dims,TLONG,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 10288 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3djj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3djj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, dim2, naxis1, naxis2, naxis3, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	nulval = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(6))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(7))
;
	LONGLONG*	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 4809 "CFITSIO.xs"
		LONGLONG dims[3];
#line 10327 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4811 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),naxis3*dim2*dim1*sizeof_datatype(TLONGLONG));
			RETVAL=ffg3djj(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,(LONGLONG*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis3; dims[1] = dim2; dims[2] = dim1;
			array = get_mortalspace(dim1*dim2*naxis3,TLONGLONG);
			RETVAL=ffg3djj(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,array,&anynul,&status);
			unpack3D(ST(8),array,dims,TLONGLONG,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 10349 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3de); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3de)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, dim2, naxis1, naxis2, naxis3, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	float	nulval = (float)SvNV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(6))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(7))
;
	float *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 4843 "CFITSIO.xs"
		LONGLONG dims[3];
#line 10388 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4845 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),naxis3*dim2*dim1*sizeof_datatype(TFLOAT));
			RETVAL=ffg3de(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,(float*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis3; dims[1] = dim2; dims[2] = dim1;
			array = get_mortalspace(dim1*dim2*naxis3,TFLOAT);
			RETVAL=ffg3de(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,array,&anynul,&status);
			unpack3D(ST(8),array,dims,TFLOAT,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 10410 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3dd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffg3dd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, nulval, dim1, dim2, naxis1, naxis2, naxis3, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	double	nulval = (double)SvNV(ST(2))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(6))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(7))
;
	double *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 4877 "CFITSIO.xs"
		LONGLONG dims[3];
#line 10449 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4879 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),naxis3*dim2*dim1*sizeof_datatype(TDOUBLE));
			RETVAL=ffg3dd(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,(double*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			dims[0]=naxis3; dims[1] = dim2; dims[2] = dim1;
			array = get_mortalspace(dim1*dim2*naxis3,TDOUBLE);
			RETVAL=ffg3dd(fptr->fptr,group,nulval,dim1,dim2,naxis1,naxis2,naxis3,array,&anynul,&status);
			unpack3D(ST(8),array,dims,TDOUBLE,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 10471 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcdw); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcdw)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, colnum, dispwidth, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	int	dispwidth;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffgcdw(fptr, colnum, &dispwidth, &status);
	sv_setiv(ST(2), (IV)dispwidth);
	SvSETMAGIC(ST(2));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghtb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghtb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 10)
       croak_xs_usage(cv,  "fptr, rowlen, nrows, tfields, ttype, tbcol, tform, tunit, extname, status");
    {
	FitsFile *	fptr;
	long	rowlen;
	long	nrows;
	int	tfields;
	char **	ttype;
	long *	tbcol;
	char **	tform;
	char **	tunit;
	char *	extname;
	int	status = (int)SvIV(ST(9))
;
#line 4923 "CFITSIO.xs"
		int i;
#line 10538 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4925 "CFITSIO.xs"
		ffghtb(fptr->fptr,0,&rowlen,&nrows,&tfields,NULL,NULL,NULL,NULL,NULL,&status);

		tbcol = (ST(5)!=&PL_sv_undef) ? get_mortalspace(tfields,TLONG) : NULL;
		extname = (ST(8)!=&PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		if (ST(4)!=&PL_sv_undef) {
			ttype = get_mortalspace(tfields,TSTRING);
			for (i=0; i<tfields; i++)
				ttype[i] = get_mortalspace(FLEN_VALUE,TBYTE);
		} else ttype = NULL;
		if (ST(6)!=&PL_sv_undef) {
			tform = get_mortalspace(tfields,TSTRING);
			for (i=0; i<tfields; i++)
				tform[i] = get_mortalspace(FLEN_VALUE,TBYTE);
		} else tform = NULL;
		if (ST(7)!=&PL_sv_undef) {
			tunit = get_mortalspace(tfields,TSTRING);
			for (i=0; i<tfields; i++)
				tunit[i] = get_mortalspace(FLEN_VALUE,TBYTE);
		} else tunit = NULL;

		RETVAL=ffghtb(fptr->fptr,tfields,&rowlen,&nrows,&tfields,ttype,tbcol,tform,tunit,extname,&status);
		if (ST(1)!=&PL_sv_undef) sv_setiv(ST(1),rowlen);
		if (ST(2)!=&PL_sv_undef) sv_setiv(ST(2),nrows);
		if (ST(3)!=&PL_sv_undef) sv_setiv(ST(3),tfields);
		if (ST(4)!=&PL_sv_undef) unpack1D(ST(4),ttype,tfields,TSTRING,fptr->perlyunpacking);
		if (ST(5)!=&PL_sv_undef) unpack1D(ST(5),tbcol,tfields,TLONG,fptr->perlyunpacking);
		if (ST(6)!=&PL_sv_undef) unpack1D(ST(6),tform,tfields,TSTRING,fptr->perlyunpacking);
		if (ST(7)!=&PL_sv_undef) unpack1D(ST(7),tunit,tfields,TSTRING,fptr->perlyunpacking);
		if (ST(8)!=&PL_sv_undef) sv_setpv(ST(8),extname);
#line 10578 "CFITSIO.c"
	sv_setiv(ST(9), (IV)status);
	SvSETMAGIC(ST(9));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghtbll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghtbll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 10)
       croak_xs_usage(cv,  "fptr, rowlen, nrows, tfields, ttype, tbcol, tform, tunit, extname, status");
    {
	FitsFile *	fptr;
	LONGLONG	rowlen;
	LONGLONG	nrows;
	int	tfields;
	char **	ttype;
	LONGLONG *	tbcol;
	char **	tform;
	char **	tunit;
	char *	extname;
	int	status = (int)SvIV(ST(9))
;
#line 4974 "CFITSIO.xs"
		int i;
#line 10609 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 4976 "CFITSIO.xs"
		ffghtbll(fptr->fptr,0,&rowlen,&nrows,&tfields,NULL,NULL,NULL,NULL,NULL,&status);

		tbcol = (ST(5)!=&PL_sv_undef) ? get_mortalspace(tfields,TLONGLONG) : NULL;
		extname = (ST(8)!=&PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		if (ST(4)!=&PL_sv_undef) {
			ttype = get_mortalspace(tfields,TSTRING);
			for (i=0; i<tfields; i++)
				ttype[i] = get_mortalspace(FLEN_VALUE,TBYTE);
		} else ttype = NULL;
		if (ST(6)!=&PL_sv_undef) {
			tform = get_mortalspace(tfields,TSTRING);
			for (i=0; i<tfields; i++)
				tform[i] = get_mortalspace(FLEN_VALUE,TBYTE);
		} else tform = NULL;
		if (ST(7)!=&PL_sv_undef) {
			tunit = get_mortalspace(tfields,TSTRING);
			for (i=0; i<tfields; i++)
				tunit[i] = get_mortalspace(FLEN_VALUE,TBYTE);
		} else tunit = NULL;

		RETVAL=ffghtbll(fptr->fptr,tfields,&rowlen,&nrows,&tfields,ttype,tbcol,tform,tunit,extname,&status);
		if (ST(1)!=&PL_sv_undef) sv_setiv(ST(1),rowlen);
		if (ST(2)!=&PL_sv_undef) sv_setiv(ST(2),nrows);
		if (ST(3)!=&PL_sv_undef) sv_setiv(ST(3),tfields);
		if (ST(4)!=&PL_sv_undef) unpack1D(ST(4),ttype,tfields,TSTRING,fptr->perlyunpacking);
		if (ST(5)!=&PL_sv_undef) unpack1D(ST(5),tbcol,tfields,TLONGLONG,fptr->perlyunpacking);
		if (ST(6)!=&PL_sv_undef) unpack1D(ST(6),tform,tfields,TSTRING,fptr->perlyunpacking);
		if (ST(7)!=&PL_sv_undef) unpack1D(ST(7),tunit,tfields,TSTRING,fptr->perlyunpacking);
		if (ST(8)!=&PL_sv_undef) sv_setpv(ST(8),extname);
#line 10649 "CFITSIO.c"
	sv_setiv(ST(9), (IV)status);
	SvSETMAGIC(ST(9));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghbn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghbn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, nrows, tfields, ttype, tform, tunit, extname, pcount, status");
    {
	FitsFile *	fptr;
	long	nrows;
	int	tfields;
	char **	ttype;
	char **	tform;
	char **	tunit;
	char *	extname;
	long	pcount;
	int	status = (int)SvIV(ST(8))
;
#line 5024 "CFITSIO.xs"
		int i;
#line 10679 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5026 "CFITSIO.xs"
		ffghbn(fptr->fptr,0,&nrows,&tfields,NULL,NULL,NULL,NULL,&pcount,&status);
		extname = (ST(7)!=&PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		if (ST(4) != &PL_sv_undef) {
			ttype = get_mortalspace(tfields,TSTRING);
			for (i=0; i<tfields; i++)
				ttype[i] = get_mortalspace(FLEN_VALUE,TBYTE);
		} else ttype = NULL;
		if (ST(5) != &PL_sv_undef) {
			tform = get_mortalspace(tfields,TSTRING);
			for (i=0; i<tfields; i++)
				tform[i] = get_mortalspace(FLEN_VALUE,TBYTE);
		} else tform = NULL;
		if (ST(6) != &PL_sv_undef) {
			tunit = get_mortalspace(tfields,TSTRING);
			for (i=0; i<tfields; i++)
				tunit[i] = get_mortalspace(FLEN_VALUE,TBYTE);
		} else tunit = NULL;
		RETVAL=ffghbn(fptr->fptr,tfields,&nrows,&tfields,ttype,tform,tunit,extname,&pcount,&status);
		if (ST(1)!=&PL_sv_undef) sv_setiv(ST(1),nrows);
		if (ST(2)!=&PL_sv_undef) sv_setiv(ST(2),tfields);
		if (ST(3)!=&PL_sv_undef) unpack1D(ST(3),ttype,tfields,TSTRING,fptr->perlyunpacking);
		if (ST(4)!=&PL_sv_undef) unpack1D(ST(4),tform,tfields,TSTRING,fptr->perlyunpacking);
		if (ST(5)!=&PL_sv_undef) unpack1D(ST(5),tunit,tfields,TSTRING,fptr->perlyunpacking);
		if (ST(6)!=&PL_sv_undef) sv_setpv(ST(6),extname);
		if (ST(7)!=&PL_sv_undef) sv_setiv(ST(7),pcount);
#line 10715 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghbnll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghbnll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, nrows, tfields, ttype, tform, tunit, extname, pcount, status");
    {
	FitsFile *	fptr;
	LONGLONG	nrows;
	int	tfields;
	char **	ttype;
	char **	tform;
	char **	tunit;
	char *	extname;
	LONGLONG	pcount;
	int	status = (int)SvIV(ST(8))
;
#line 5070 "CFITSIO.xs"
		int i;
#line 10745 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5072 "CFITSIO.xs"
		ffghbnll(fptr->fptr,0,&nrows,&tfields,NULL,NULL,NULL,NULL,&pcount,&status);
		extname = (ST(7)!=&PL_sv_undef) ? get_mortalspace(FLEN_VALUE,TBYTE) : NULL;
		if (ST(4) != &PL_sv_undef) {
			ttype = get_mortalspace(tfields,TSTRING);
			for (i=0; i<tfields; i++)
				ttype[i] = get_mortalspace(FLEN_VALUE,TBYTE);
		} else ttype = NULL;
		if (ST(5) != &PL_sv_undef) {
			tform = get_mortalspace(tfields,TSTRING);
			for (i=0; i<tfields; i++)
				tform[i] = get_mortalspace(FLEN_VALUE,TBYTE);
		} else tform = NULL;
		if (ST(6) != &PL_sv_undef) {
			tunit = get_mortalspace(tfields,TSTRING);
			for (i=0; i<tfields; i++)
				tunit[i] = get_mortalspace(FLEN_VALUE,TBYTE);
		} else tunit = NULL;
		RETVAL=ffghbnll(fptr->fptr,tfields,&nrows,&tfields,ttype,tform,tunit,extname,&pcount,&status);
		if (ST(1)!=&PL_sv_undef) sv_setiv(ST(1),nrows);
		if (ST(2)!=&PL_sv_undef) sv_setiv(ST(2),tfields);
		if (ST(3)!=&PL_sv_undef) unpack1D(ST(3),ttype,tfields,TSTRING,fptr->perlyunpacking);
		if (ST(4)!=&PL_sv_undef) unpack1D(ST(4),tform,tfields,TSTRING,fptr->perlyunpacking);
		if (ST(5)!=&PL_sv_undef) unpack1D(ST(5),tunit,tfields,TSTRING,fptr->perlyunpacking);
		if (ST(6)!=&PL_sv_undef) sv_setpv(ST(6),extname);
		if (ST(7)!=&PL_sv_undef) sv_setiv(ST(7),pcount);
#line 10781 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcrd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcrd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keyname, card, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	card;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 5111 "CFITSIO.xs"
		card = get_mortalspace(FLEN_CARD,TBYTE);
		RETVAL=ffgcrd(fptr,keyname,card,&status);
#line 10824 "CFITSIO.c"
	if (card != NULL)
		sv_setpv((SV *)ST(2), card);
	SvSETMAGIC(ST(2));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcv); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcv)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 10)
       croak_xs_usage(cv,  "fptr, datatype, colnum, firstrow, firstelem, nelements, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	datatype = (int)SvIV(ST(1))
;
	int	colnum = (int)SvIV(ST(2))
;
	LONGLONG	firstrow = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	firstelem = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	nelements = (LONGLONG)SvIV(ST(5))
;
	SV *	nulval = ST(6)
;
	void *	array;
	int	anynul;
	int	status = (int)SvIV(ST(9))
;
#line 5134 "CFITSIO.xs"
		long col_width;
		LONGLONG i;
		int storage_datatype;
#line 10866 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5138 "CFITSIO.xs"
		storage_datatype = datatype;
		if (datatype == TBIT)
			storage_datatype = TLOGICAL;
		if (!PERLYUNPACKING(fptr->perlyunpacking) && datatype != TSTRING) {
			SvGROW(ST(7),nelements*sizeof_datatype(storage_datatype));
			RETVAL=ffgcv(fptr->fptr,datatype,colnum,firstrow,firstelem,nelements,pack1D(nulval,storage_datatype),(void*)SvPV(ST(7),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelements,storage_datatype);
			if (datatype == TSTRING) {
				col_width = column_width(fptr->fptr,colnum);
				for (i=0;i<nelements;i++)
					*((char**)array+i)=get_mortalspace(col_width+1,TBYTE);
			}
			RETVAL=ffgcv(fptr->fptr,datatype,colnum,firstrow,firstelem,nelements,pack1D(nulval,storage_datatype),array,&anynul,&status);
			unpack1D(ST(7),array,nelements,storage_datatype,fptr->perlyunpacking);
		}
		if (ST(8) != &PL_sv_undef) sv_setiv(ST(8),anynul);
#line 10895 "CFITSIO.c"
	sv_setiv(ST(9), (IV)status);
	SvSETMAGIC(ST(9));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcx); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcx)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, colnum, frow, fbit, nbit, larray, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	fbit = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nbit = (LONGLONG)SvIV(ST(4))
;
	logical *	larray;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5173 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nbit*sizeof_datatype(TLOGICAL));
			RETVAL = ffgcx(fptr->fptr,colnum,frow,fbit,nbit,(logical*)SvPV(ST(5),PL_na),&status);
		}
		else {
			larray = get_mortalspace(nbit,TLOGICAL);
			RETVAL=ffgcx(fptr->fptr,colnum,frow,fbit,nbit,larray,&status);
			unpack1D(ST(5),larray,nbit,TLOGICAL,fptr->perlyunpacking);
		}
#line 10944 "CFITSIO.c"
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcxui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcxui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, colnum, frow, nrows, fbit, nbits, array, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nrows = (LONGLONG)SvIV(ST(3))
;
	long	fbit = (long)SvIV(ST(4))
;
	int	nbits = (int)SvIV(ST(5))
;
	unsigned short *	array;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5200 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nrows*sizeof_datatype(TUSHORT));
			RETVAL = ffgcxui(fptr->fptr,colnum,frow,nrows,fbit,nbits,(unsigned short*)SvPV(ST(6),PL_na),&status);
		}
		else {
			array = get_mortalspace(nrows,TUSHORT);
			RETVAL = ffgcxui(fptr->fptr,colnum,frow,nrows,fbit,nbits,array,&status);
			unpack1D(ST(6),array,nrows,TUSHORT,fptr->perlyunpacking);
		}
#line 10995 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcxuk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcxuk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, colnum, frow, nrows, fbit, nbits, array, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nrows = (LONGLONG)SvIV(ST(3))
;
	long	fbit = (long)SvIV(ST(4))
;
	int	nbits = (int)SvIV(ST(5))
;
	unsigned int *	array;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5227 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nrows*sizeof_datatype(TUINT));
			RETVAL = ffgcxuk(fptr->fptr,colnum,frow,nrows,fbit,nbits,(unsigned int*)SvPV(ST(6),PL_na),&status);
		}
		else {
			array = get_mortalspace(nrows,TUINT);
			RETVAL = ffgcxuk(fptr->fptr,colnum,frow,nrows,fbit,nbits,array,&status);
			unpack1D(ST(6),array,nrows,TUINT,fptr->perlyunpacking);
		}
#line 11046 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvs); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvs)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, firstrow, firstelem, nelements, nulstr, array, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	firstrow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	firstelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelements = (LONGLONG)SvIV(ST(4))
;
	char *	nulstr;
	char **	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
#line 5255 "CFITSIO.xs"
		LONGLONG i;
		long col_size;
#line 11081 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(5) == &PL_sv_undef)
			nulstr = (char *)NULL;
		else
			nulstr = (char *)SvPV(ST(5),PL_na);
	}
;
#line 5258 "CFITSIO.xs"
		col_size = column_width(fptr->fptr,colnum);
		array = get_mortalspace(nelements,TSTRING);
		for (i=0;i<nelements;i++)
			array[i] = get_mortalspace(col_size+1,TBYTE);
		RETVAL=ffgcvs(fptr->fptr,colnum,firstrow,firstelem,nelements,nulstr,array,&anynul,&status);
		unpack1D(ST(6),array,nelements,TSTRING,fptr->perlyunpacking);
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11107 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	logical	nulval = (logical)SvIV(ST(5))
;
	logical *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5284 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
			RETVAL=ffgcvl(fptr->fptr,cnum,frow,felem,nelem,nulval,(logical*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcvl(fptr->fptr,cnum,frow,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(6),array,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11160 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	byte	nulval = (byte)SvIV(ST(5))
;
	byte *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5313 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nelem*sizeof_datatype(TBYTE));
			RETVAL=ffgcvb(fptr->fptr,cnum,frow,felem,nelem,nulval,(byte*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TBYTE);
			RETVAL=ffgcvb(fptr->fptr,cnum,frow,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(6),array,nelem,TBYTE,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11213 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	signed char	nulval = (signed char)SvIV(ST(5))
;
	signed char*	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5342 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nelem*sizeof_datatype(TSBYTE));
			RETVAL=ffgcvsb(fptr->fptr,cnum,frow,felem,nelem,nulval,(signed char*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TSBYTE);
			RETVAL=ffgcvsb(fptr->fptr,cnum,frow,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(6),array,nelem,TSBYTE,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11266 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	unsigned short	nulval = (unsigned short)SvUV(ST(5))
;
	unsigned short *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5371 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nelem*sizeof_datatype(TUSHORT));
			RETVAL=ffgcvui(fptr->fptr,cnum,frow,felem,nelem,nulval,(unsigned short*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TUSHORT);
			RETVAL=ffgcvui(fptr->fptr,cnum,frow,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(6),array,nelem,TUSHORT,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11319 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvi); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvi)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	short	nulval = (short)SvIV(ST(5))
;
	short *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5400 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nelem*sizeof_datatype(TSHORT));
			RETVAL=ffgcvi(fptr->fptr,cnum,frow,felem,nelem,nulval,(short*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TSHORT);
			RETVAL=ffgcvi(fptr->fptr,cnum,frow,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(6),array,nelem,TSHORT,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11372 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvuk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvuk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	unsigned int	nulval = (unsigned int)SvUV(ST(5))
;
	unsigned int *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5429 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nelem*sizeof_datatype(TUINT));
			RETVAL=ffgcvuk(fptr->fptr,cnum,frow,felem,nelem,nulval,(unsigned int*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TUINT);
			RETVAL=ffgcvuk(fptr->fptr,cnum,frow,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(6),array,nelem,TUINT,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11425 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	int	nulval = (int)SvIV(ST(5))
;
	int *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5458 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nelem*sizeof_datatype(TINT));
			RETVAL=ffgcvk(fptr->fptr,cnum,frow,felem,nelem,nulval,(int*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TINT);
			RETVAL=ffgcvk(fptr->fptr,cnum,frow,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(6),array,nelem,TINT,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11478 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvuj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvuj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	unsigned long	nulval = (unsigned long)SvUV(ST(5))
;
	unsigned long *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5487 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nelem*sizeof_datatype(TULONG));
			RETVAL=ffgcvuj(fptr->fptr,cnum,frow,felem,nelem,nulval,(unsigned long*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TULONG);
			RETVAL=ffgcvuj(fptr->fptr,cnum,frow,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(6),array,nelem,TULONG,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11531 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	long	nulval = (long)SvIV(ST(5))
;
	long *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5516 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nelem*sizeof_datatype(TLONG));
			RETVAL=ffgcvj(fptr->fptr,cnum,frow,felem,nelem,nulval,(long*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TLONG);
			RETVAL=ffgcvj(fptr->fptr,cnum,frow,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(6),array,nelem,TLONG,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11584 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	nulval = (LONGLONG)SvIV(ST(5))
;
	LONGLONG*	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5545 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nelem*sizeof_datatype(TLONGLONG));
			RETVAL=ffgcvjj(fptr->fptr,cnum,frow,felem,nelem,nulval,(LONGLONG*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TLONGLONG);
			RETVAL=ffgcvjj(fptr->fptr,cnum,frow,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(6),array,nelem,TLONGLONG,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11637 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcve); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcve)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	float	nulval = (float)SvNV(ST(5))
;
	float *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5574 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nelem*sizeof_datatype(TFLOAT));
			RETVAL=ffgcve(fptr->fptr,cnum,frow,felem,nelem,nulval,(float*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TFLOAT);
			RETVAL=ffgcve(fptr->fptr,cnum,frow,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(6),array,nelem,TFLOAT,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11690 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	double	nulval = (double)SvNV(ST(5))
;
	double *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5603 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nelem*sizeof_datatype(TDOUBLE));
			RETVAL=ffgcvd(fptr->fptr,cnum,frow,felem,nelem,nulval,(double*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TDOUBLE);
			RETVAL=ffgcvd(fptr->fptr,cnum,frow,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(6),array,nelem,TDOUBLE,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11743 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	float	nulval = (float)SvNV(ST(5))
;
	float *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5632 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nelem*sizeof_datatype(TCOMPLEX));
			RETVAL=ffgcvc(fptr->fptr,cnum,frow,felem,nelem,nulval,(float*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TCOMPLEX);
			RETVAL=ffgcvc(fptr->fptr,cnum,frow,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(6),array,nelem,TCOMPLEX,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11796 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcvm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	double	nulval = (double)SvNV(ST(5))
;
	double *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5661 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),nelem*sizeof_datatype(TDBLCOMPLEX));
			RETVAL=ffgcvm(fptr->fptr,cnum,frow,felem,nelem,nulval,(double*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TDBLCOMPLEX);
			RETVAL=ffgcvm(fptr->fptr,cnum,frow,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(6),array,nelem,TDBLCOMPLEX,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11849 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcf)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 10)
       croak_xs_usage(cv,  "fptr, datatype, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	datatype = (int)SvIV(ST(1))
;
	int	colnum = (int)SvIV(ST(2))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(5))
;
	void *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(9))
;
#line 5691 "CFITSIO.xs"
		int storage_datatype;
#line 11885 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5693 "CFITSIO.xs"
		storage_datatype = datatype;
		if (datatype == TBIT)
			storage_datatype = TLOGICAL;
		if (!PERLYUNPACKING(fptr->perlyunpacking) && datatype != TSTRING) {
			if (ST(6)!=&PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(storage_datatype));
				array = (void*)SvPV(ST(6),PL_na);
			}
			else
				array = get_mortalspace(nelem,storage_datatype);
			if (ST(7) != &PL_sv_undef) {
				SvGROW(ST(7),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(7),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcf(fptr->fptr,datatype,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,storage_datatype);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcf(fptr->fptr,datatype,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(6)!=&PL_sv_undef)
				unpack1D(ST(6),array,nelem,storage_datatype,fptr->perlyunpacking);
			if (ST(7)!=&PL_sv_undef)
				unpack1D(ST(7),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(8)!=&PL_sv_undef)
			sv_setiv(ST(8),anynul);
#line 11925 "CFITSIO.c"
	sv_setiv(ST(9), (IV)status);
	SvSETMAGIC(ST(9));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfs); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfs)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	char **	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
#line 5741 "CFITSIO.xs"
		long col_size;
		LONGLONG i;
#line 11960 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5744 "CFITSIO.xs"
		col_size = column_width(fptr->fptr,colnum);
		array = get_mortalspace(nelem,TSTRING);
		for (i=0;i<nelem;i++)
			array[i] = get_mortalspace(col_size+1,TBYTE);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);

			RETVAL=ffgcfs(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfs(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TSTRING,fptr->perlyunpacking);
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 11992 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	logical *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5784 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				array = (logical*)SvPV(ST(5),PL_na);
			}
			else
				array = get_mortalspace(nelem,TLOGICAL);
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfl(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TLOGICAL);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfl(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TLOGICAL,fptr->perlyunpacking);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 12057 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	byte *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5826 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TBYTE));
				array = (byte*)SvPV(ST(5),PL_na);
			}
			else
				array = get_mortalspace(nelem,TBYTE);
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfb(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TBYTE);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfb(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TBYTE,fptr->perlyunpacking);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 12122 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	signed char*	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5868 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TSBYTE));
				array = (signed char*)SvPV(ST(5),PL_na);
			}
			else
				array = get_mortalspace(nelem,TSBYTE);
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfsb(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TSBYTE);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfsb(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TSBYTE,fptr->perlyunpacking);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 12187 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	unsigned short *	array;
	logical *	nularray;
	int	anynul = (int)SvIV(ST(7))
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5910 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TUSHORT));
				array = (unsigned short*)SvPV(ST(5),PL_na);
			}
			else
				array = get_mortalspace(nelem,TUSHORT);
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfui(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TUSHORT);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfui(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TUSHORT,fptr->perlyunpacking);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 12253 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfi); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfi)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	short *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5952 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TSHORT));
				array = (short*)SvPV(ST(5),PL_na);
			}
			else
				array = get_mortalspace(nelem,TSHORT);
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfi(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TSHORT);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfi(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TSHORT,fptr->perlyunpacking);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 12318 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	int *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 5994 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TINT));
				array = (int*)SvPV(ST(5),PL_na);
			}
			else
				array = get_mortalspace(nelem,TINT);
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfk(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TINT);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfk(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TINT,fptr->perlyunpacking);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 12383 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfuk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfuk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	unsigned int *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6036 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TUINT));
				array = (unsigned int*)SvPV(ST(5),PL_na);
			}
			else
				array = get_mortalspace(nelem,TUINT);
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfuk(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TUINT);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfuk(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TUINT,fptr->perlyunpacking);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 12448 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	long *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6078 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLONG));
				array = (long*)SvPV(ST(5),PL_na);
			}
			else
				array = get_mortalspace(nelem,TLONG);
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfj(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TLONG);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfj(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TLONG,fptr->perlyunpacking);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 12513 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	LONGLONG*	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6120 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLONGLONG));
				array = (LONGLONG*)SvPV(ST(5),PL_na);
			}
			else
				array = get_mortalspace(nelem,TLONGLONG);
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfjj(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TLONGLONG);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfjj(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TLONGLONG,fptr->perlyunpacking);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 12578 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfuj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfuj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	unsigned long *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6162 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TULONG));
				array = (unsigned long*)SvPV(ST(5),PL_na);
			}
			else
				array = get_mortalspace(nelem,TULONG);
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfuj(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TULONG);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfuj(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TULONG,fptr->perlyunpacking);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 12643 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfe); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfe)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	float *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6204 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TFLOAT));
				array = (float*)SvPV(ST(5),PL_na);
			}
			else
				array = get_mortalspace(nelem,TFLOAT);
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfe(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TFLOAT);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfe(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TFLOAT,fptr->perlyunpacking);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 12708 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	double *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6246 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TDOUBLE));
				array = (double*)SvPV(ST(5),PL_na);
			}
			else
				array = get_mortalspace(nelem,TDOUBLE);
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfd(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TDOUBLE);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfd(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TDOUBLE,fptr->perlyunpacking);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 12773 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	float *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6288 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TCOMPLEX));
				array = (float*)SvPV(ST(5),PL_na);
			}
			else
				array = get_mortalspace(nelem,TCOMPLEX);
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfc(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TCOMPLEX);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfc(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TCOMPLEX,fptr->perlyunpacking);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 12838 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgcfm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	double *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6330 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TDBLCOMPLEX));
				array = (double*)SvPV(ST(5),PL_na);
			}
			else
				array = get_mortalspace(nelem,TDBLCOMPLEX);
			if (ST(6) != &PL_sv_undef) {
				SvGROW(ST(6),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(6),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfm(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TDBLCOMPLEX);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgcfm(fptr->fptr,colnum,frow,felem,nelem,array,nularray,&anynul,&status);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),array,nelem,TDBLCOMPLEX,fptr->perlyunpacking);
			if (ST(6) != &PL_sv_undef) unpack1D(ST(6),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef) sv_setiv(ST(7),anynul);
#line 12903 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgdes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgdes)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, colnum, rownum, repeat, offset, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	rownum = (LONGLONG)SvIV(ST(2))
;
	long	repeat;
	long	offset;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6369 "CFITSIO.xs"
		RETVAL = ffgdes(fptr,colnum,rownum,&repeat,&offset,&status);
		if (ST(3) != &PL_sv_undef) sv_setiv(ST(3),repeat);
		if (ST(4) != &PL_sv_undef) sv_setiv(ST(4),offset);
#line 12943 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgdesll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgdesll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, colnum, rownum, repeat, offset, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	rownum = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	repeat;
	LONGLONG	offset;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6388 "CFITSIO.xs"
		RETVAL = ffgdesll(fptr,colnum,rownum,&repeat,&offset,&status);
		if (ST(3) != &PL_sv_undef) sv_setiv(ST(3),repeat);
		if (ST(4) != &PL_sv_undef) sv_setiv(ST(4),offset);
#line 12983 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgdess); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgdess)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, colnum, frow, nrows, repeat, offset, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nrows = (LONGLONG)SvIV(ST(3))
;
	long *	repeat;
	long *	offset;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6408 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nrows*sizeof_datatype(TLONG));
				repeat = (long*)SvPV(ST(4),PL_na);
			}
			else
				repeat = get_mortalspace(nrows,TLONG);

			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nrows*sizeof_datatype(TLONG));
				offset = (long*)SvPV(ST(5),PL_na);
			}
			else
				offset = get_mortalspace(nrows,TLONG);
			RETVAL=ffgdess(fptr->fptr,colnum,frow,nrows,repeat,offset,&status);
		}
		else {
			repeat = get_mortalspace(nrows,TLONG);
			offset = get_mortalspace(nrows,TLONG);
			RETVAL=ffgdess(fptr->fptr,colnum,frow,nrows,repeat,offset,&status);
			if (ST(4) != &PL_sv_undef) unpack1D(ST(4),repeat,nrows,TLONG,fptr->perlyunpacking);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),offset,nrows,TLONG,fptr->perlyunpacking);
		}
#line 13045 "CFITSIO.c"
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgdessll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgdessll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, colnum, frow, nrows, repeat, offset, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nrows = (LONGLONG)SvIV(ST(3))
;
	LONGLONG*	repeat;
	LONGLONG*	offset;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6448 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nrows*sizeof_datatype(TLONGLONG));
				repeat = (LONGLONG*)SvPV(ST(4),PL_na);
			}
			else
				repeat = get_mortalspace(nrows,TLONGLONG);

			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nrows*sizeof_datatype(TLONGLONG));
				offset = (LONGLONG*)SvPV(ST(5),PL_na);
			}
			else
				offset = get_mortalspace(nrows,TLONGLONG);
			RETVAL=ffgdessll(fptr->fptr,colnum,frow,nrows,repeat,offset,&status);
		}
		else {
			repeat = get_mortalspace(nrows,TLONGLONG);
			offset = get_mortalspace(nrows,TLONGLONG);
			RETVAL=ffgdessll(fptr->fptr,colnum,frow,nrows,repeat,offset,&status);
			if (ST(4) != &PL_sv_undef) unpack1D(ST(4),repeat,nrows,TLONGLONG,fptr->perlyunpacking);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),offset,nrows,TLONGLONG,fptr->perlyunpacking);
		}
#line 13107 "CFITSIO.c"
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgmsg); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgmsg)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "err_msg");
    {
	char *	err_msg;
	int	RETVAL;
	dXSTARG;
#line 6481 "CFITSIO.xs"
		err_msg = get_mortalspace(FLEN_ERRMSG,TBYTE);
		RETVAL = fits_read_errmsg(err_msg);
#line 13131 "CFITSIO.c"
	if (err_msg != NULL)
		sv_setpv((SV *)ST(0), err_msg);
	SvSETMAGIC(ST(0));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	byte *	array;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6499 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(4),nelem*sizeof_datatype(TBYTE));
			RETVAL=ffggpb(fptr->fptr,group,felem,nelem,(byte*)SvPV(ST(4),PL_na),&status);
		}
		else {
			array = get_mortalspace(nelem,TBYTE);
			RETVAL=ffggpb(fptr->fptr,group,felem,nelem,array,&status);
			unpack1D(ST(4),array,nelem,TBYTE,fptr->perlyunpacking);
		}
#line 13179 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	signed char*	array;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6524 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(4),nelem*sizeof_datatype(TSBYTE));
			RETVAL=ffggpsb(fptr->fptr,group,felem,nelem,(signed char*)SvPV(ST(4),PL_na),&status);
		}
		else {
			array = get_mortalspace(nelem,TSBYTE);
			RETVAL=ffggpsb(fptr->fptr,group,felem,nelem,array,&status);
			unpack1D(ST(4),array,nelem,TSBYTE,fptr->perlyunpacking);
		}
#line 13226 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpi); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpi)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	short *	array;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6549 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(4),nelem*sizeof_datatype(TSHORT));
			RETVAL=ffggpi(fptr->fptr,group,felem,nelem,(short*)SvPV(ST(4),PL_na),&status);
		}
		else {
			array = get_mortalspace(nelem,TSHORT);
			RETVAL=ffggpi(fptr->fptr,group,felem,nelem,array,&status);
			unpack1D(ST(4),array,nelem,TSHORT,fptr->perlyunpacking);
		}
#line 13273 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	unsigned short *	array;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6574 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(4),nelem*sizeof_datatype(TUSHORT));
			RETVAL=ffggpui(fptr->fptr,group,felem,nelem,(unsigned short*)SvPV(ST(4),PL_na),&status);
		}
		else {
			array = get_mortalspace(nelem,TUSHORT);
			RETVAL=ffggpui(fptr->fptr,group,felem,nelem,array,&status);
			unpack1D(ST(4),array,nelem,TUSHORT,fptr->perlyunpacking);
		}
#line 13320 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	int *	array;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6599 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(4),nelem*sizeof_datatype(TINT));
			RETVAL=ffggpk(fptr->fptr,group,felem,nelem,(int*)SvPV(ST(4),PL_na),&status);
		}
		else {
			array = get_mortalspace(nelem,TINT);
			RETVAL=ffggpk(fptr->fptr,group,felem,nelem,array,&status);
			unpack1D(ST(4),array,nelem,TINT,fptr->perlyunpacking);
		}
#line 13367 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpuk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpuk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	unsigned int *	array;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6624 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(4),nelem*sizeof_datatype(TUINT));
			RETVAL=ffggpuk(fptr->fptr,group,felem,nelem,(unsigned int*)SvPV(ST(4),PL_na),&status);
		}
		else {
			array = get_mortalspace(nelem,TUINT);
			RETVAL=ffggpuk(fptr->fptr,group,felem,nelem,array,&status);
			unpack1D(ST(4),array,nelem,TUINT,fptr->perlyunpacking);
		}
#line 13414 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	long *	array;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6649 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(4),nelem*sizeof_datatype(TLONG));
			RETVAL=ffggpj(fptr->fptr,group,felem,nelem,(long*)SvPV(ST(4),PL_na),&status);
		}
		else {
			array = get_mortalspace(nelem,TLONG);
			RETVAL=ffggpj(fptr->fptr,group,felem,nelem,array,&status);
			unpack1D(ST(4),array,nelem,TLONG,fptr->perlyunpacking);
		}
#line 13461 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	LONGLONG*	array;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6674 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(4),nelem*sizeof_datatype(TLONGLONG));
			RETVAL=ffggpjj(fptr->fptr,group,felem,nelem,(LONGLONG*)SvPV(ST(4),PL_na),&status);
		}
		else {
			array = get_mortalspace(nelem,TLONGLONG);
			RETVAL=ffggpjj(fptr->fptr,group,felem,nelem,array,&status);
			unpack1D(ST(4),array,nelem,TLONGLONG,fptr->perlyunpacking);
		}
#line 13508 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpuj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpuj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	unsigned long *	array;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6699 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(4),nelem*sizeof_datatype(TULONG));
			RETVAL=ffggpuj(fptr->fptr,group,felem,nelem,(unsigned long*)SvPV(ST(4),PL_na),&status);
		}
		else {
			array = get_mortalspace(nelem,TULONG);
			RETVAL=ffggpuj(fptr->fptr,group,felem,nelem,array,&status);
			unpack1D(ST(4),array,nelem,TULONG,fptr->perlyunpacking);
		}
#line 13555 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpe); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpe)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	float *	array;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6724 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(4),nelem*sizeof_datatype(TFLOAT));
			RETVAL=ffggpe(fptr->fptr,group,felem,nelem,(float*)SvPV(ST(4),PL_na),&status);
		}
		else {
			array = get_mortalspace(nelem,TFLOAT);
			RETVAL=ffggpe(fptr->fptr,group,felem,nelem,array,&status);
			unpack1D(ST(4),array,nelem,TFLOAT,fptr->perlyunpacking);
		}
#line 13602 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffggpd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	double *	array;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6749 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(4),nelem*sizeof_datatype(TDOUBLE));
			RETVAL=ffggpd(fptr->fptr,group,felem,nelem,(double*)SvPV(ST(4),PL_na),&status);
		}
		else {
			array = get_mortalspace(nelem,TDOUBLE);
			RETVAL=ffggpd(fptr->fptr,group,felem,nelem,array,&status);
			unpack1D(ST(4),array,nelem,TDOUBLE,fptr->perlyunpacking);
		}
#line 13649 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpv); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpv)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, datatype, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	datatype = (int)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	SV *	nulval = ST(4)
;
	void *	array;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6776 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nelem*sizeof_datatype(datatype));
			RETVAL=ffgpv(fptr->fptr,datatype,felem,nelem,pack1D(nulval,datatype),(void*)SvPV(ST(5),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,datatype);
			RETVAL=ffgpv(fptr->fptr,datatype,felem,nelem,pack1D(nulval,datatype),array,&anynul,&status);
			unpack1D(ST(5),array,nelem,datatype,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 13700 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgics); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgics)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 10)
       croak_xs_usage(cv,  "fptr, xrefval, yrefval, xrefpix, yrefpix, xinc, yinc, rot, coordtype, status");
    {
	fitsfile *	fptr;
	double	xrefval;
	double	yrefval;
	double	xrefpix;
	double	yrefpix;
	double	xinc;
	double	yinc;
	double	rot;
	char *	coordtype;
	int	status = (int)SvIV(ST(9))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6806 "CFITSIO.xs"
		coordtype = get_mortalspace(FLEN_VALUE,TBYTE);
		RETVAL=ffgics(fptr,&xrefval,&yrefval,&xrefpix,&yrefpix,&xinc,&yinc,&rot,coordtype,&status);
		if (ST(1) != &PL_sv_undef) sv_setnv(ST(1),xrefval);
		if (ST(2) != &PL_sv_undef) sv_setnv(ST(2),yrefval);
		if (ST(3) != &PL_sv_undef) sv_setnv(ST(3),xrefpix);
		if (ST(4) != &PL_sv_undef) sv_setnv(ST(4),yrefpix);
		if (ST(5) != &PL_sv_undef) sv_setnv(ST(5),xinc);
		if (ST(6) != &PL_sv_undef) sv_setnv(ST(6),yinc);
		if (ST(7) != &PL_sv_undef) sv_setnv(ST(7),rot);
#line 13748 "CFITSIO.c"
	if (coordtype != NULL)
		sv_setpv((SV *)ST(8), coordtype);
	SvSETMAGIC(ST(8));
	sv_setiv(ST(9), (IV)status);
	SvSETMAGIC(ST(9));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgicsa); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgicsa)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, version, xrefval, yrefval, xrefpix, yrefpix, xinc, yinc, rot, coordtype, status");
    {
	fitsfile *	fptr;
	char	version = (char)*SvPV_nolen(ST(1))
;
	double	xrefval;
	double	yrefval;
	double	xrefpix;
	double	yrefpix;
	double	xinc;
	double	yinc;
	double	rot;
	char *	coordtype;
	int	status = (int)SvIV(ST(10))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6837 "CFITSIO.xs"
		coordtype = get_mortalspace(FLEN_VALUE,TBYTE);
		RETVAL=ffgics(fptr,&xrefval,&yrefval,&xrefpix,&yrefpix,&xinc,&yinc,&rot,coordtype,&status);
		if (ST(2) != &PL_sv_undef) sv_setnv(ST(2),xrefval);
		if (ST(3) != &PL_sv_undef) sv_setnv(ST(3),yrefval);
		if (ST(4) != &PL_sv_undef) sv_setnv(ST(4),xrefpix);
		if (ST(5) != &PL_sv_undef) sv_setnv(ST(5),yrefpix);
		if (ST(6) != &PL_sv_undef) sv_setnv(ST(6),xinc);
		if (ST(7) != &PL_sv_undef) sv_setnv(ST(7),yinc);
		if (ST(8) != &PL_sv_undef) sv_setnv(ST(8),rot);
#line 13801 "CFITSIO.c"
	if (coordtype != NULL)
		sv_setpv((SV *)ST(9), coordtype);
	SvSETMAGIC(ST(9));
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	byte	nulval = (byte)SvIV(ST(4))
;
	byte *	array;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6865 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nelem*sizeof_datatype(TBYTE));
			RETVAL=ffgpvb(fptr->fptr,group,felem,nelem,nulval,(byte*)SvPV(ST(5),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TBYTE);
			RETVAL=ffgpvb(fptr->fptr,group,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(5),array,nelem,TBYTE,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 13855 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	signed char	nulval = (signed char)SvIV(ST(4))
;
	signed char*	array;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6893 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nelem*sizeof_datatype(TSBYTE));
			RETVAL=ffgpvsb(fptr->fptr,group,felem,nelem,nulval,(signed char*)SvPV(ST(5),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TSBYTE);
			RETVAL=ffgpvsb(fptr->fptr,group,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(5),array,nelem,TSBYTE,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 13906 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvi); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvi)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	short	nulval = (short)SvIV(ST(4))
;
	short *	array;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6921 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nelem*sizeof_datatype(TSHORT));
			RETVAL=ffgpvi(fptr->fptr,group,felem,nelem,nulval,(short*)SvPV(ST(5),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TSHORT);
			RETVAL=ffgpvi(fptr->fptr,group,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(5),array,nelem,TSHORT,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 13957 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	unsigned short	nulval = (unsigned short)SvUV(ST(4))
;
	unsigned short *	array;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6949 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nelem*sizeof_datatype(TUSHORT));
			RETVAL=ffgpvui(fptr->fptr,group,felem,nelem,nulval,(unsigned short*)SvPV(ST(5),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TUSHORT);
			RETVAL=ffgpvui(fptr->fptr,group,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(5),array,nelem,TUSHORT,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14008 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	int	nulval = (int)SvIV(ST(4))
;
	int *	array;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 6977 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nelem*sizeof_datatype(TINT));
			RETVAL=ffgpvk(fptr->fptr,group,felem,nelem,nulval,(int*)SvPV(ST(5),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TINT);
			RETVAL=ffgpvk(fptr->fptr,group,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(5),array,nelem,TINT,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14059 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvuk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvuk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	unsigned int	nulval = (unsigned int)SvUV(ST(4))
;
	unsigned int *	array;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7005 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nelem*sizeof_datatype(TUINT));
			RETVAL=ffgpvuk(fptr->fptr,group,felem,nelem,nulval,(unsigned int*)SvPV(ST(5),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TUINT);
			RETVAL=ffgpvuk(fptr->fptr,group,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(5),array,nelem,TUINT,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14110 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	long	nulval = (long)SvIV(ST(4))
;
	long *	array;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7033 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nelem*sizeof_datatype(TLONG));
			RETVAL=ffgpvj(fptr->fptr,group,felem,nelem,nulval,(long*)SvPV(ST(5),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TLONG);
			RETVAL=ffgpvj(fptr->fptr,group,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(5),array,nelem,TLONG,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14161 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nulval = (LONGLONG)SvIV(ST(4))
;
	LONGLONG*	array;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7061 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nelem*sizeof_datatype(TLONGLONG));
			RETVAL=ffgpvjj(fptr->fptr,group,felem,nelem,nulval,(LONGLONG*)SvPV(ST(5),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TLONGLONG);
			RETVAL=ffgpvjj(fptr->fptr,group,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(5),array,nelem,TLONGLONG,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14212 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvuj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvuj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	unsigned long	nulval = (unsigned long)SvUV(ST(4))
;
	unsigned long *	array;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7089 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nelem*sizeof_datatype(TULONG));
			RETVAL=ffgpvuj(fptr->fptr,group,felem,nelem,nulval,(unsigned long*)SvPV(ST(5),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TULONG);
			RETVAL=ffgpvuj(fptr->fptr,group,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(5),array,nelem,TULONG,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14263 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpve); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpve)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	float	nulval = (float)SvNV(ST(4))
;
	float *	array;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7117 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nelem*sizeof_datatype(TFLOAT));
			RETVAL=ffgpve(fptr->fptr,group,felem,nelem,nulval,(float*)SvPV(ST(5),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TFLOAT);
			RETVAL=ffgpve(fptr->fptr,group,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(5),array,nelem,TFLOAT,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14314 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpvd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	double	nulval = (double)SvNV(ST(4))
;
	double *	array;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7145 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nelem*sizeof_datatype(TDOUBLE));
			RETVAL=ffgpvd(fptr->fptr,group,felem,nelem,nulval,(double*)SvPV(ST(5),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TDOUBLE);
			RETVAL=ffgpvd(fptr->fptr,group,felem,nelem,nulval,array,&anynul,&status);
			unpack1D(ST(5),array,nelem,TDOUBLE,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14365 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghpr); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghpr)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, simple, bitpix, naxis, naxes, pcount, gcount, extend, status");
    {
	FitsFile *	fptr;
	int	simple;
	int	bitpix;
	int	naxis;
	long *	naxes;
	long	pcount;
	long	gcount;
	int	extend;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7175 "CFITSIO.xs"
		if (ST(4)!=&PL_sv_undef) { /* caller wants naxes to be set */
			ffghpr(fptr->fptr,0,NULL,NULL,&naxis,NULL,NULL,NULL,NULL,&status);
			naxes = get_mortalspace(naxis,TLONG);
		} else {
			naxes = NULL;
			naxis = 0;
		}
		RETVAL=ffghpr(fptr->fptr,naxis,&simple,&bitpix,&naxis,naxes,&pcount,&gcount,&extend,&status);

		if (ST(1)!=&PL_sv_undef) sv_setiv(ST(1),simple);
		if (ST(2)!=&PL_sv_undef) sv_setiv(ST(2),bitpix);
		if (ST(3)!=&PL_sv_undef) sv_setiv(ST(3),naxis);
		if (ST(4)!=&PL_sv_undef) unpack1D(ST(4),naxes,naxis,TLONG,
						  fptr->perlyunpacking);
		if (ST(5)!=&PL_sv_undef) sv_setiv(ST(5),pcount);
		if (ST(6)!=&PL_sv_undef) sv_setiv(ST(6),gcount);
		if (ST(7)!=&PL_sv_undef) sv_setiv(ST(7),extend);
#line 14420 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghprll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffghprll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, simple, bitpix, naxis, naxes, pcount, gcount, extend, status");
    {
	FitsFile *	fptr;
	int	simple;
	int	bitpix;
	int	naxis;
	LONGLONG *	naxes;
	long	pcount;
	long	gcount;
	int	extend;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7212 "CFITSIO.xs"
		if (ST(4)!=&PL_sv_undef) { /* caller wants naxes to be set */
			ffghprll(fptr->fptr,0,NULL,NULL,&naxis,NULL,NULL,NULL,NULL,&status);
			naxes = get_mortalspace(naxis,TLONGLONG);
		} else {
			naxes = NULL;
			naxis = 0;
		}
		RETVAL=ffghprll(fptr->fptr,naxis,&simple,&bitpix,&naxis,naxes,&pcount,&gcount,&extend,&status);

		if (ST(1)!=&PL_sv_undef) sv_setiv(ST(1),simple);
		if (ST(2)!=&PL_sv_undef) sv_setiv(ST(2),bitpix);
		if (ST(3)!=&PL_sv_undef) sv_setiv(ST(3),naxis);
		if (ST(4)!=&PL_sv_undef) unpack1D(ST(4),naxes,naxis,TLONGLONG,
						  fptr->perlyunpacking);
		if (ST(5)!=&PL_sv_undef) sv_setiv(ST(5),pcount);
		if (ST(6)!=&PL_sv_undef) sv_setiv(ST(6),gcount);
		if (ST(7)!=&PL_sv_undef) sv_setiv(ST(7),extend);
#line 14475 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpf)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, datatype, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	int	datatype = (int)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	void *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7247 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4)!=&PL_sv_undef) {
				SvGROW(ST(4),nelem*sizeof_datatype(datatype));
				array = (void*)SvPV(ST(4),PL_na);
			}
			else
				array = get_mortalspace(nelem,datatype);
			if (ST(5)!=&PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(5),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpf(fptr->fptr,datatype,felem,nelem,array,nularray,&anynul,&status);

		}
		else {
			array = get_mortalspace(nelem,datatype);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpf(fptr->fptr,datatype,felem,nelem,array,nularray,&anynul,&status);
			if (ST(4)!=&PL_sv_undef)
				unpack1D(ST(4),array,nelem,datatype,fptr->perlyunpacking);
			if (ST(5)!=&PL_sv_undef)
				unpack1D(ST(5),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(6)!=&PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14541 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	byte *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7291 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nelem*sizeof_datatype(TBYTE));
				array = (byte*)SvPV(ST(4),PL_na);
			}
			else
				array = get_mortalspace(nelem,TBYTE);
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(5),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfb(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TBYTE);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfb(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
			if (ST(4) != &PL_sv_undef) unpack1D(ST(4),array,nelem,TBYTE,fptr->perlyunpacking);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14604 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	signed char*	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7332 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nelem*sizeof_datatype(TSBYTE));
				array = (signed char*)SvPV(ST(4),PL_na);
			}
			else
				array = get_mortalspace(nelem,TSBYTE);
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(5),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfsb(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TSBYTE);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfsb(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
			if (ST(4) != &PL_sv_undef) unpack1D(ST(4),array,nelem,TSBYTE,fptr->perlyunpacking);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14667 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfi); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfi)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	short *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7373 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nelem*sizeof_datatype(TSHORT));
				array = (short*)SvPV(ST(4),PL_na);
			}
			else
				array = get_mortalspace(nelem,TSHORT);
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(5),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfi(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TSHORT);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfi(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
			if (ST(4) != &PL_sv_undef) unpack1D(ST(4),array,nelem,TSHORT,fptr->perlyunpacking);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14730 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	unsigned short *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7414 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nelem*sizeof_datatype(TUSHORT));
				array = (unsigned short*)SvPV(ST(4),PL_na);
			}
			else
				array = get_mortalspace(nelem,TUSHORT);
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(5),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfui(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TUSHORT);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfui(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
			if (ST(4) != &PL_sv_undef) unpack1D(ST(4),array,nelem,TUSHORT,fptr->perlyunpacking);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14793 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	int *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7455 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nelem*sizeof_datatype(TINT));
				array = (int*)SvPV(ST(4),PL_na);
			}
			else
				array = get_mortalspace(nelem,TINT);
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(5),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfk(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TINT);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfk(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
			if (ST(4) != &PL_sv_undef) unpack1D(ST(4),array,nelem,TINT,fptr->perlyunpacking);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14856 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfuk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfuk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	unsigned int *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7496 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nelem*sizeof_datatype(TUINT));
				array = (unsigned int*)SvPV(ST(4),PL_na);
			}
			else
				array = get_mortalspace(nelem,TUINT);
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(5),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfuk(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TUINT);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfuk(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
			if (ST(4) != &PL_sv_undef) unpack1D(ST(4),array,nelem,TUINT,fptr->perlyunpacking);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14919 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	long *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7537 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nelem*sizeof_datatype(TLONG));
				array = (long*)SvPV(ST(4),PL_na);
			}
			else
				array = get_mortalspace(nelem,TLONG);
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(5),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfj(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TLONG);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfj(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
			if (ST(4) != &PL_sv_undef) unpack1D(ST(4),array,nelem,TLONG,fptr->perlyunpacking);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 14982 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG*	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7578 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nelem*sizeof_datatype(TLONGLONG));
				array = (LONGLONG*)SvPV(ST(4),PL_na);
			}
			else
				array = get_mortalspace(nelem,TLONGLONG);
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(5),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfjj(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TLONGLONG);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfjj(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
			if (ST(4) != &PL_sv_undef) unpack1D(ST(4),array,nelem,TLONGLONG,fptr->perlyunpacking);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 15045 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfuj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfuj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	unsigned long *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7619 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nelem*sizeof_datatype(TULONG));
				array = (unsigned long*)SvPV(ST(4),PL_na);
			}
			else
				array = get_mortalspace(nelem,TULONG);
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(5),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfuj(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TULONG);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfuj(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
			if (ST(4) != &PL_sv_undef) unpack1D(ST(4),array,nelem,TBYTE,fptr->perlyunpacking);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 15108 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfe); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfe)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	float *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7660 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nelem*sizeof_datatype(TFLOAT));
				array = (float*)SvPV(ST(4),PL_na);
			}
			else
				array = get_mortalspace(nelem,TFLOAT);
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(5),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfe(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TFLOAT);
			nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfe(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
			if (ST(4) != &PL_sv_undef) unpack1D(ST(4),array,nelem,TFLOAT,fptr->perlyunpacking);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 15171 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpfd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nularray, anynul, status");
    {
	FitsFile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	double *	array;
	logical *	nularray;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7701 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nelem*sizeof_datatype(TDOUBLE));
				array = (double*)SvPV(ST(4),PL_na);
			}
			else
				array = get_mortalspace(nelem,TDOUBLE);
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				nularray = (logical*)SvPV(ST(5),PL_na);
			}
			else
				nularray = get_mortalspace(nelem,TLOGICAL);
			RETVAL=ffgpfd(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
		}
		else {
			array = get_mortalspace(nelem,TDOUBLE);
			nularray = get_mortalspace(nelem,TLOGICAL);
				RETVAL=ffgpfd(fptr->fptr,group,felem,nelem,array,nularray,&anynul,&status);
			if (ST(4) != &PL_sv_undef) unpack1D(ST(4),array,nelem,TDOUBLE,fptr->perlyunpacking);
			if (ST(5) != &PL_sv_undef) unpack1D(ST(5),nularray,nelem,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(6) != &PL_sv_undef) sv_setiv(ST(6),anynul);
#line 15234 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgstr); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgstr)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, string, card, status");
    {
	fitsfile *	fptr;
	char *	string;
	char *	card;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			string = (char *)NULL;
		else
			string = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffgstr(fptr, string, card, &status);
	if (card != NULL)
		sv_setpv((SV *)ST(2), card);
	SvSETMAGIC(ST(2));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#if (CFITSIO_MAJOR > 2 && (CFITSIO_MINOR > 36))
#define XSubPPtmpAAAC 1


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgksl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgksl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keyname, length, status");
    {
	fitsfile *	fptr;
	const char *	keyname = (const char *)SvPV_nolen(ST(1))
;
	int	length;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffgksl(fptr, keyname, &length, &status);
	sv_setiv(ST(2), (IV)length);
	SvSETMAGIC(ST(2));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsky); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsky)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, keyname, firstchar, maxchar, value, valuelen, comm, status");
    {
	fitsfile *	fptr;
	const char *	keyname = (const char *)SvPV_nolen(ST(1))
;
	int	firstchar = (int)SvIV(ST(2))
;
	int	maxchar = (int)SvIV(ST(3))
;
	char *	value;
	int	valuelen;
	char *	comm;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 7770 "CFITSIO.xs"
		value = (ST(4) != &PL_sv_undef) ? get_mortalspace(maxchar+1,TBYTE) : NULL;
		comm = (ST(6) != &PL_sv_undef) ? get_mortalspace(FLEN_COMMENT,TBYTE) : NULL;
		RETVAL=ffgsky(fptr,keyname,firstchar,maxchar,value,&valuelen,comm,&status);
		if (ST(5) != &PL_sv_undef) sv_setiv(ST(5),valuelen);
#line 15361 "CFITSIO.c"
	if (value != NULL)
		sv_setpv((SV *)ST(4), value);
	SvSETMAGIC(ST(4));
	if (comm != NULL)
		sv_setpv((SV *)ST(6), comm);
	SvSETMAGIC(ST(6));
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdstr); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffdstr)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, string, status");
    {
	fitsfile *	fptr;
	char *	string;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			string = (char *)NULL;
		else
			string = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffdstr(fptr, string, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgky); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgky)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, datatype, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	int	datatype = (int)SvIV(ST(1))
;
	char *	keyname;
	void *	value;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(2) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(2),PL_na);
	}
;
#line 7804 "CFITSIO.xs"
		comment=(ST(4)!=&PL_sv_undef) ? get_mortalspace(FLEN_COMMENT,TBYTE) : NULL;
		switch (datatype) {
			case TSTRING:
				value = get_mortalspace(FLEN_VALUE,TBYTE); break;
			case TLOGICAL:
				value = get_mortalspace(1,TINT); break;
			default:
				value = get_mortalspace(1,datatype);
		}
		RETVAL=ffgky(fptr,datatype,keyname,value,comment,&status);
		if (datatype == TLOGICAL)
			datatype = TINT;
		unpackScalar(ST(3),value,datatype);
#line 15463 "CFITSIO.c"
	if (comment != NULL)
		sv_setpv((SV *)ST(4), comment);
	SvSETMAGIC(ST(4));
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkyt); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkyt)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, intval, frac, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	long	intval;
	double	frac;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 7834 "CFITSIO.xs"
		comment=(ST(4)!=&PL_sv_undef) ? get_mortalspace(FLEN_COMMENT,TBYTE) : NULL;
		RETVAL=ffgkyt(fptr,keyname,&intval,&frac,comment,&status);
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),intval);
		if (ST(3) != &PL_sv_undef) sv_setnv(ST(3),frac);
#line 15513 "CFITSIO.c"
	if (comment != NULL)
		sv_setpv((SV *)ST(4), comment);
	SvSETMAGIC(ST(4));
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgunt); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgunt)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keyname, unit, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	unit;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 7853 "CFITSIO.xs"
		unit = get_mortalspace(FLEN_VALUE,TBYTE);
		RETVAL=ffgunt(fptr,keyname,unit,&status);
#line 15559 "CFITSIO.c"
	if (unit != NULL)
		sv_setpv((SV *)ST(2), unit);
	SvSETMAGIC(ST(2));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkls); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkls)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, longstr, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	longstr;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 7871 "CFITSIO.xs"
		comment=(ST(3)!=&PL_sv_undef) ? get_mortalspace(FLEN_COMMENT,TBYTE) : NULL;
		RETVAL=ffgkls(fptr,keyname,&longstr,comment,&status);
		sv_setpv(ST(2),longstr);
		free(longstr);
#line 15608 "CFITSIO.c"
	if (comment != NULL)
		sv_setpv((SV *)ST(3), comment);
	SvSETMAGIC(ST(3));
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fffree); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fffree)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "value, status");
    {
	void *	value = INT2PTR(void *,SvIV(ST(0)))
;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	RETVAL = fffree(value, &status);
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkys); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkys)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	value;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 7901 "CFITSIO.xs"
		value = get_mortalspace(FLEN_VALUE,TBYTE);
		comment=(ST(3)!=&PL_sv_undef) ? get_mortalspace(FLEN_COMMENT,TBYTE) : NULL;
		RETVAL=ffgkys(fptr,keyname,value,comment,&status);
#line 15681 "CFITSIO.c"
	if (value != NULL)
		sv_setpv((SV *)ST(2), value);
	SvSETMAGIC(ST(2));
	if (comment != NULL)
		sv_setpv((SV *)ST(3), comment);
	SvSETMAGIC(ST(3));
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkyl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkyl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	int	value;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 7921 "CFITSIO.xs"
		comment=(ST(3)!=&PL_sv_undef) ? get_mortalspace(FLEN_COMMENT,TBYTE) : NULL;
		RETVAL=ffgkyl(fptr,keyname,&value,comment,&status);
#line 15731 "CFITSIO.c"
	sv_setiv(ST(2), (IV)value);
	SvSETMAGIC(ST(2));
	if (comment != NULL)
		sv_setpv((SV *)ST(3), comment);
	SvSETMAGIC(ST(3));
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkyj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkyj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	long	value;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 7940 "CFITSIO.xs"
		comment=(ST(3)!=&PL_sv_undef) ? get_mortalspace(FLEN_COMMENT,TBYTE) : NULL;
		RETVAL=ffgkyj(fptr,keyname,&value,comment,&status);
#line 15780 "CFITSIO.c"
	sv_setiv(ST(2), (IV)value);
	SvSETMAGIC(ST(2));
	if (comment != NULL)
		sv_setpv((SV *)ST(3), comment);
	SvSETMAGIC(ST(3));
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkyjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkyjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	LONGLONG	value;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 7959 "CFITSIO.xs"
		comment=(ST(3)!=&PL_sv_undef) ? get_mortalspace(FLEN_COMMENT,TBYTE) : NULL;
		RETVAL=ffgkyjj(fptr,keyname,&value,comment,&status);
#line 15829 "CFITSIO.c"
	sv_setiv(ST(2), (IV)value);
	SvSETMAGIC(ST(2));
	if (comment != NULL)
		sv_setpv((SV *)ST(3), comment);
	SvSETMAGIC(ST(3));
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkye); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkye)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float	value;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 7978 "CFITSIO.xs"
		comment=(ST(3)!=&PL_sv_undef) ? get_mortalspace(FLEN_COMMENT,TBYTE) : NULL;
		RETVAL=ffgkye(fptr,keyname,&value,comment,&status);
#line 15878 "CFITSIO.c"
	sv_setnv(ST(2), (double) value);
	SvSETMAGIC(ST(2));
	if (comment != NULL)
		sv_setpv((SV *)ST(3), comment);
	SvSETMAGIC(ST(3));
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkyd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkyd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double	value;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 7997 "CFITSIO.xs"
		comment=(ST(3)!=&PL_sv_undef) ? get_mortalspace(FLEN_COMMENT,TBYTE) : NULL;
		RETVAL=ffgkyd(fptr,keyname,&value,comment,&status);
#line 15927 "CFITSIO.c"
	sv_setnv(ST(2), (double)value);
	SvSETMAGIC(ST(2));
	if (comment != NULL)
		sv_setpv((SV *)ST(3), comment);
	SvSETMAGIC(ST(3));
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkyc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkyc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float *	value;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 8016 "CFITSIO.xs"
		value = get_mortalspace(1,TCOMPLEX);
		comment=(ST(3)!=&PL_sv_undef) ? get_mortalspace(FLEN_COMMENT,TBYTE) : NULL;
		RETVAL=ffgkyc(fptr,keyname,value,comment,&status);
		unpackScalar(ST(2),value,TCOMPLEX);
#line 15978 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	if (comment != NULL)
		sv_setpv((SV *)ST(3), comment);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkym); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkym)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double *	value;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 8036 "CFITSIO.xs"
		value = get_mortalspace(1,TDBLCOMPLEX);
		comment=(ST(3)!=&PL_sv_undef) ? get_mortalspace(FLEN_COMMENT,TBYTE) : NULL;
		RETVAL=ffgkym(fptr,keyname,value,comment,&status);
		unpackScalar(ST(2),value,TDBLCOMPLEX);
#line 16027 "CFITSIO.c"
	if (comment != NULL)
		sv_setpv((SV *)ST(3), comment);
	SvSETMAGIC(ST(3));
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkyn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkyn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keynum, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	int	keynum = (int)SvIV(ST(1))
;
	char *	keyname;
	char *	value;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8057 "CFITSIO.xs"
		keyname = get_mortalspace(FLEN_KEYWORD,TBYTE);
		value = get_mortalspace(FLEN_VALUE,TBYTE);
		comment=(ST(4)!=&PL_sv_undef) ? get_mortalspace(FLEN_COMMENT,TBYTE) : NULL;
		RETVAL=ffgkyn(fptr,keynum,keyname,value,comment,&status);
#line 16070 "CFITSIO.c"
	if (keyname != NULL)
		sv_setpv((SV *)ST(2), keyname);
	SvSETMAGIC(ST(2));
	if (value != NULL)
		sv_setpv((SV *)ST(3), value);
	SvSETMAGIC(ST(3));
	if (comment != NULL)
		sv_setpv((SV *)ST(4), comment);
	SvSETMAGIC(ST(4));
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkns); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkns)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, keyname, nstart, nkeys, value, nfound, status");
    {
	FitsFile *	fptr;
	char *	keyname;
	int	nstart = (int)SvIV(ST(2))
;
	int	nkeys = (int)SvIV(ST(3))
;
	char **	value;
	int	nfound;
	int	status = (int)SvIV(ST(6))
;
#line 8081 "CFITSIO.xs"
		int i;
#line 16109 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 8083 "CFITSIO.xs"
		value=get_mortalspace(nkeys,TSTRING);
		for (i=0; i<nkeys; i++)
			value[i] = get_mortalspace(FLEN_VALUE,TBYTE);
		RETVAL=ffgkns(fptr->fptr,keyname,nstart,nkeys,value,&nfound,&status);
		unpack1D(ST(4),value,(nkeys>nfound) ? nfound : nkeys,TSTRING,fptr->perlyunpacking);
#line 16133 "CFITSIO.c"
	sv_setiv(ST(5), (IV)nfound);
	SvSETMAGIC(ST(5));
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgknl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgknl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, keyname, nstart, nkeys, value, nfound, status");
    {
	FitsFile *	fptr;
	char *	keyname;
	int	nstart = (int)SvIV(ST(2))
;
	int	nkeys = (int)SvIV(ST(3))
;
	int *	value;
	int	nfound;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 8106 "CFITSIO.xs"
		value=get_mortalspace(nkeys,TINT);
		RETVAL=ffgknl(fptr->fptr,keyname,nstart,nkeys,value,&nfound,&status);
		unpack1D(ST(4),value,(nkeys>nfound) ? nfound : nkeys,TINT,fptr->perlyunpacking);
#line 16184 "CFITSIO.c"
	sv_setiv(ST(5), (IV)nfound);
	SvSETMAGIC(ST(5));
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgknj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgknj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, keyname, nstart, nkeys, value, nfound, status");
    {
	FitsFile *	fptr;
	char *	keyname;
	int	nstart = (int)SvIV(ST(2))
;
	int	nkeys = (int)SvIV(ST(3))
;
	long *	value;
	int	nfound;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 8127 "CFITSIO.xs"
		value=get_mortalspace(nkeys,TLONG);
		RETVAL=ffgknj(fptr->fptr,keyname,nstart,nkeys,value,&nfound,&status);
		unpack1D(ST(4),value,(nkeys>nfound) ? nfound : nkeys,TLONG,fptr->perlyunpacking);
#line 16235 "CFITSIO.c"
	sv_setiv(ST(5), (IV)nfound);
	SvSETMAGIC(ST(5));
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgknjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgknjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, keyname, nstart, nkeys, value, nfound, status");
    {
	FitsFile *	fptr;
	char *	keyname;
	int	nstart = (int)SvIV(ST(2))
;
	int	nkeys = (int)SvIV(ST(3))
;
	LONGLONG *	value;
	int	nfound;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 8148 "CFITSIO.xs"
		value=get_mortalspace(nkeys,TLONGLONG);
		RETVAL=ffgknjj(fptr->fptr,keyname,nstart,nkeys,value,&nfound,&status);
		unpack1D(ST(4),value,(nkeys>nfound) ? nfound : nkeys,TLONGLONG, fptr->perlyunpacking);
#line 16286 "CFITSIO.c"
	sv_setiv(ST(5), (IV)nfound);
	SvSETMAGIC(ST(5));
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkne); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkne)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, keyname, nstart, nkeys, value, nfound, status");
    {
	FitsFile *	fptr;
	char *	keyname;
	int	nstart = (int)SvIV(ST(2))
;
	int	nkeys = (int)SvIV(ST(3))
;
	float *	value;
	int	nfound;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 8169 "CFITSIO.xs"
		value=get_mortalspace(nkeys,TFLOAT);
		RETVAL=ffgkne(fptr->fptr,keyname,nstart,nkeys,value,&nfound,&status);
		unpack1D(ST(4),value,(nkeys>nfound) ? nfound : nkeys,TFLOAT,fptr->perlyunpacking);
#line 16337 "CFITSIO.c"
	sv_setiv(ST(5), (IV)nfound);
	SvSETMAGIC(ST(5));
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgknd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgknd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, keyname, nstart, nkeys, value, nfound, status");
    {
	FitsFile *	fptr;
	char *	keyname;
	int	nstart = (int)SvIV(ST(2))
;
	int	nkeys = (int)SvIV(ST(3))
;
	double *	value;
	int	nfound;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 8190 "CFITSIO.xs"
		value=get_mortalspace(nkeys,TDOUBLE);
		RETVAL=ffgknd(fptr->fptr,keyname,nstart,nkeys,value,&nfound,&status);
		unpack1D(ST(4),value,(nkeys>nfound) ? nfound : nkeys,TDOUBLE,fptr->perlyunpacking);
#line 16388 "CFITSIO.c"
	sv_setiv(ST(5), (IV)nfound);
	SvSETMAGIC(ST(5));
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkey); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkey)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	value;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;
#line 8209 "CFITSIO.xs"
		value = get_mortalspace(FLEN_VALUE,TBYTE);
		comment=(ST(3)!=&PL_sv_undef) ? get_mortalspace(FLEN_COMMENT,TBYTE) : NULL;
		RETVAL=ffgkey(fptr,keyname,value,comment,&status);
#line 16435 "CFITSIO.c"
	if (value != NULL)
		sv_setpv((SV *)ST(2), value);
	SvSETMAGIC(ST(2));
	if (comment != NULL)
		sv_setpv((SV *)ST(3), comment);
	SvSETMAGIC(ST(3));
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgrec); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgrec)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keynum, card, status");
    {
	fitsfile *	fptr;
	int	keynum = (int)SvIV(ST(1))
;
	char *	card;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8228 "CFITSIO.xs"
		card = get_mortalspace(FLEN_CARD,TBYTE);
		RETVAL=ffgrec(fptr,keynum,card,&status);
#line 16477 "CFITSIO.c"
	if (card != NULL)
		sv_setpv((SV *)ST(2), card);
	SvSETMAGIC(ST(2));
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsv); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsv)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, dtype, blc, trc, inc, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	dtype = (int)SvIV(ST(1))
;
	long *	blc = (long *)packND(ST(2),TLONG)
;
	long *	trc = (long *)packND(ST(3),TLONG)
;
	long *	inc = (long *)packND(ST(4),TLONG)
;
	SV *	nulval = ST(5)
;
	void *	array;
	int	anynul;
	int	status = (int)SvIV(ST(8))
;
#line 8250 "CFITSIO.xs"
		long ndata, *naxes;
		int i, naxis, storage_dtype;
#line 16516 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8253 "CFITSIO.xs"
		storage_dtype = dtype;
		if (dtype == TBIT)
			storage_dtype = TLOGICAL;

		/* get the size of the image */
		RETVAL = ffgidm(fptr->fptr, &naxis, &status);
		naxes = get_mortalspace(naxis, TLONG);
		RETVAL = ffgisz(fptr->fptr, naxis, naxes, &status);

		/* determine the number of pixels to be read */
		ndata = 1;
		for (i=0; i<naxis; i++)
		ndata *= (trc[i]-blc[i]+1)/inc[i] +
			(((trc[i]-blc[i]+1) % inc[i]) ? 1 : 0);

		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(6),ndata*sizeof_datatype(storage_dtype));
			RETVAL=ffgsv(fptr->fptr,dtype,blc,trc,inc,(nulval!=&PL_sv_undef ? pack1D(nulval,storage_dtype) : NULL),(void*)SvPV(ST(6),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,storage_dtype);
			RETVAL=ffgsv(fptr->fptr,dtype,blc,trc,inc,(nulval != &PL_sv_undef ? pack1D(nulval,storage_dtype) : NULL),array,&anynul,&status);
			unpack1D(ST(6),array,ndata,storage_dtype,fptr->perlyunpacking);
		}
		if (ST(7) != &PL_sv_undef)
			sv_setiv(ST(7),anynul);
#line 16553 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	byte	nulval = (byte)SvIV(ST(7))
;
	byte *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8300 "CFITSIO.xs"
		long ndata;
		int i;
#line 16593 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8303 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),ndata*sizeof_datatype(TBYTE));
			RETVAL=ffgsvb(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,(byte*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TBYTE);
			RETVAL=ffgsvb(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,array,&anynul,&status);
			unpack1D(ST(8),array,ndata,TBYTE,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 16618 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	signed char	nulval = (signed char)SvIV(ST(7))
;
	signed char*	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8338 "CFITSIO.xs"
		long ndata;
		int i;
#line 16658 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8341 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),ndata*sizeof_datatype(TSBYTE));
			RETVAL=ffgsvsb(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,(signed char*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TSBYTE);
			RETVAL=ffgsvsb(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,array,&anynul,&status);
			unpack1D(ST(8),array,ndata,TSBYTE,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 16683 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvi); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvi)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	short	nulval = (short)SvIV(ST(7))
;
	short *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8376 "CFITSIO.xs"
		long ndata;
		int i;
#line 16723 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8379 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),ndata*sizeof_datatype(TSHORT));
			RETVAL=ffgsvi(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,(short*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TSHORT);
			RETVAL=ffgsvi(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,array,&anynul,&status);
			unpack1D(ST(8),array,ndata,TSHORT,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 16748 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	unsigned short	nulval = (unsigned short)SvUV(ST(7))
;
	unsigned short *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8414 "CFITSIO.xs"
		long ndata;
		int i;
#line 16788 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8417 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),ndata*sizeof_datatype(TUSHORT));
			RETVAL=ffgsvui(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,(unsigned short*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TUSHORT);
			RETVAL=ffgsvui(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,array,&anynul,&status);
			unpack1D(ST(8),array,ndata,TUSHORT,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 16813 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	int	nulval = (int)SvIV(ST(7))
;
	int *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8452 "CFITSIO.xs"
		long ndata;
		int i;
#line 16853 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8455 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),ndata*sizeof_datatype(TINT));
			RETVAL=ffgsvk(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,(int*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TINT);
			RETVAL=ffgsvk(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,array,&anynul,&status);
			unpack1D(ST(8),array,ndata,TINT,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 16878 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvuk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvuk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	unsigned int	nulval = (unsigned int)SvUV(ST(7))
;
	unsigned int *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8490 "CFITSIO.xs"
		long ndata;
		int i;
#line 16918 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8493 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),ndata*sizeof_datatype(TUINT));
			RETVAL=ffgsvuk(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,(unsigned int*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TUINT);
			RETVAL=ffgsvuk(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,array,&anynul,&status);
			unpack1D(ST(8),array,ndata,TUINT,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 16943 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	long	nulval = (long)SvIV(ST(7))
;
	long *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8528 "CFITSIO.xs"
		long ndata;
		int i;
#line 16983 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8531 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),ndata*sizeof_datatype(TLONG));
			RETVAL=ffgsvj(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,(long*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TLONG);
			RETVAL=ffgsvj(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,array,&anynul,&status);
			unpack1D(ST(8),array,ndata,TLONG,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 17008 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	LONGLONG	nulval = (LONGLONG)SvIV(ST(7))
;
	LONGLONG*	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8566 "CFITSIO.xs"
		long ndata;
		int i;
#line 17048 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8569 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),ndata*sizeof_datatype(TLONGLONG));
			RETVAL=ffgsvjj(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,(LONGLONG*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TLONGLONG);
			RETVAL=ffgsvjj(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,array,&anynul,&status);
			unpack1D(ST(8),array,ndata,TLONGLONG,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 17073 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvuj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvuj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	unsigned long	nulval = (unsigned long)SvUV(ST(7))
;
	unsigned long *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8604 "CFITSIO.xs"
		long ndata;
		int i;
#line 17113 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8607 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),ndata*sizeof_datatype(TULONG));
			RETVAL=ffgsvuj(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,(unsigned long*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TULONG);
			RETVAL=ffgsvuj(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,array,&anynul,&status);
			unpack1D(ST(8),array,ndata,TULONG,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 17138 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsve); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsve)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	float	nulval = (float)SvNV(ST(7))
;
	float *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8642 "CFITSIO.xs"
		long ndata;
		int i;
#line 17178 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8645 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),ndata*sizeof_datatype(TFLOAT));
			RETVAL=ffgsve(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,(float*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TFLOAT);
			RETVAL=ffgsve(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,array,&anynul,&status);
			unpack1D(ST(8),array,ndata,TFLOAT,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 17203 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsvd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	double	nulval = (double)SvNV(ST(7))
;
	double *	array;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8680 "CFITSIO.xs"
		long ndata;
		int i;
#line 17243 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8683 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(8),ndata*sizeof_datatype(TDOUBLE));
			RETVAL=ffgsvd(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,(double*)SvPV(ST(8),PL_na),&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TDOUBLE);
			RETVAL=ffgsvd(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,nulval,array,&anynul,&status);
			unpack1D(ST(8),array,ndata,TDOUBLE,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 17268 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, array, nularr, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	byte *	array;
	logical *	nularr;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8718 "CFITSIO.xs"
		long ndata;
		int i;
#line 17307 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8721 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(7) != &PL_sv_undef) {
				SvGROW(ST(7),ndata*sizeof_datatype(TBYTE));
				array = (byte*)SvPV(ST(7),PL_na);
			}
			else
				array = get_mortalspace(ndata,TBYTE);
			if (ST(8) != &PL_sv_undef) {
				SvGROW(ST(8),ndata*sizeof_datatype(TLOGICAL));
				nularr = (logical*)SvPV(ST(8),PL_na);
			}
			else
				nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfb(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TBYTE);
			nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfb(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
			if (ST(7) != &PL_sv_undef) unpack1D(ST(7),array,ndata,TBYTE,fptr->perlyunpacking);
			if (ST(8) != &PL_sv_undef) unpack1D(ST(8),nularr,ndata,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 17345 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, array, nularr, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	signed char*	array;
	logical *	nularr;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8769 "CFITSIO.xs"
		long ndata;
		int i;
#line 17384 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8772 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(7) != &PL_sv_undef) {
				SvGROW(ST(7),ndata*sizeof_datatype(TSBYTE));
				array = (signed char*)SvPV(ST(7),PL_na);
			}
			else
				array = get_mortalspace(ndata,TSBYTE);
			if (ST(8) != &PL_sv_undef) {
				SvGROW(ST(8),ndata*sizeof_datatype(TLOGICAL));
				nularr = (logical*)SvPV(ST(8),PL_na);
			}
			else
				nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfsb(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TSBYTE);
			nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfsb(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
			if (ST(7) != &PL_sv_undef) unpack1D(ST(7),array,ndata,TSBYTE,fptr->perlyunpacking);
			if (ST(8) != &PL_sv_undef) unpack1D(ST(8),nularr,ndata,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 17422 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfi); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfi)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, array, nularr, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	short *	array;
	logical *	nularr;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8820 "CFITSIO.xs"
		long ndata;
		int i;
#line 17461 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8823 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(7) != &PL_sv_undef) {
				SvGROW(ST(7),ndata*sizeof_datatype(TSHORT));
				array = (short*)SvPV(ST(7),PL_na);
			}
			else
				array = get_mortalspace(ndata,TSHORT);
			if (ST(8) != &PL_sv_undef) {
				SvGROW(ST(8),ndata*sizeof_datatype(TLOGICAL));
				nularr = (logical*)SvPV(ST(8),PL_na);
			}
			else
				nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfi(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TSHORT);
			nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfi(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
			if (ST(7) != &PL_sv_undef) unpack1D(ST(7),array,ndata,TSHORT,fptr->perlyunpacking);
			if (ST(8) != &PL_sv_undef) unpack1D(ST(8),nularr,ndata,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 17499 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, array, nularr, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	unsigned short *	array;
	logical *	nularr;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8871 "CFITSIO.xs"
		long ndata;
		int i;
#line 17538 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8874 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(7) != &PL_sv_undef) {
				SvGROW(ST(7),ndata*sizeof_datatype(TUSHORT));
				array = (unsigned short*)SvPV(ST(7),PL_na);
			}
			else
				array = get_mortalspace(ndata,TUSHORT);
			if (ST(8) != &PL_sv_undef) {
				SvGROW(ST(8),ndata*sizeof_datatype(TLOGICAL));
				nularr = (logical*)SvPV(ST(8),PL_na);
			}
			else
				nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfui(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TUSHORT);
			nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfui(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
			if (ST(7) != &PL_sv_undef) unpack1D(ST(7),array,ndata,TUSHORT,fptr->perlyunpacking);
			if (ST(8) != &PL_sv_undef) unpack1D(ST(8),nularr,ndata,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 17576 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, array, nularr, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	int *	array;
	logical *	nularr;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8922 "CFITSIO.xs"
		long ndata;
		int i;
#line 17615 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8925 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(7) != &PL_sv_undef) {
				SvGROW(ST(7),ndata*sizeof_datatype(TINT));
				array = (int*)SvPV(ST(7),PL_na);
			}
			else
				array = get_mortalspace(ndata,TINT);
			if (ST(8) != &PL_sv_undef) {
				SvGROW(ST(8),ndata*sizeof_datatype(TLOGICAL));
				nularr = (logical*)SvPV(ST(8),PL_na);
			}
			else
				nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfk(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TINT);
			nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfk(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
			if (ST(7) != &PL_sv_undef) unpack1D(ST(7),array,ndata,TINT,fptr->perlyunpacking);
			if (ST(8) != &PL_sv_undef) unpack1D(ST(8),nularr,ndata,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 17653 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfuk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfuk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, array, nularr, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	unsigned int *	array;
	logical *	nularr;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 8973 "CFITSIO.xs"
		long ndata;
		int i;
#line 17692 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 8976 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(7) != &PL_sv_undef) {
				SvGROW(ST(7),ndata*sizeof_datatype(TUINT));
				array = (unsigned int*)SvPV(ST(7),PL_na);
			}
			else
				array = get_mortalspace(ndata,TUINT);
			if (ST(8) != &PL_sv_undef) {
				SvGROW(ST(8),ndata*sizeof_datatype(TLOGICAL));
				nularr = (logical*)SvPV(ST(8),PL_na);
			}
			else
				nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfuk(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TUINT);
			nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfuk(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
			if (ST(7) != &PL_sv_undef) unpack1D(ST(7),array,ndata,TUINT,fptr->perlyunpacking);
			if (ST(8) != &PL_sv_undef) unpack1D(ST(8),nularr,ndata,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 17730 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, array, nularr, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	long *	array;
	logical *	nularr;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 9024 "CFITSIO.xs"
		long ndata;
		int i;
#line 17769 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 9027 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(7) != &PL_sv_undef) {
				SvGROW(ST(7),ndata*sizeof_datatype(TLONG));
				array = (long*)SvPV(ST(7),PL_na);
			}
			else
				array = get_mortalspace(ndata,TLONG);
			if (ST(8) != &PL_sv_undef) {
				SvGROW(ST(8),ndata*sizeof_datatype(TLOGICAL));
				nularr = (logical*)SvPV(ST(8),PL_na);
			}
			else
				nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfj(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TLONG);
			nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfj(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
			if (ST(7) != &PL_sv_undef) unpack1D(ST(7),array,ndata,TLONG,fptr->perlyunpacking);
			if (ST(8) != &PL_sv_undef) unpack1D(ST(8),nularr,ndata,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 17807 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, array, nularr, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	LONGLONG*	array;
	logical *	nularr;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 9075 "CFITSIO.xs"
		long ndata;
		int i;
#line 17846 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 9078 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(7) != &PL_sv_undef) {
				SvGROW(ST(7),ndata*sizeof_datatype(TLONGLONG));
				array = (LONGLONG*)SvPV(ST(7),PL_na);
			}
			else
				array = get_mortalspace(ndata,TLONGLONG);
			if (ST(8) != &PL_sv_undef) {
				SvGROW(ST(8),ndata*sizeof_datatype(TLOGICAL));
				nularr = (logical*)SvPV(ST(8),PL_na);
			}
			else
				nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfjj(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TLONGLONG);
			nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfjj(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
			if (ST(7) != &PL_sv_undef) unpack1D(ST(7),array,ndata,TLONGLONG,fptr->perlyunpacking);
			if (ST(8) != &PL_sv_undef) unpack1D(ST(8),nularr,ndata,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 17884 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfuj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfuj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, array, nularr, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	unsigned long *	array;
	logical *	nularr;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 9126 "CFITSIO.xs"
		long ndata;
		int i;
#line 17923 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 9129 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(7) != &PL_sv_undef) {
				SvGROW(ST(7),ndata*sizeof_datatype(TULONG));
				array = (unsigned long*)SvPV(ST(7),PL_na);
			}
			else
				array = get_mortalspace(ndata,TULONG);
			if (ST(8) != &PL_sv_undef) {
				SvGROW(ST(8),ndata*sizeof_datatype(TLOGICAL));
				nularr = (logical*)SvPV(ST(8),PL_na);
			}
			else
				nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfuj(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TULONG);
			nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfuj(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
			if (ST(7) != &PL_sv_undef) unpack1D(ST(7),array,ndata,TULONG,fptr->perlyunpacking);
			if (ST(8) != &PL_sv_undef) unpack1D(ST(8),nularr,ndata,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 17961 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfe); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfe)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, array, nularr, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	float *	array;
	logical *	nularr;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 9177 "CFITSIO.xs"
		long ndata;
		int i;
#line 18000 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 9180 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(7) != &PL_sv_undef) {
				SvGROW(ST(7),ndata*sizeof_datatype(TFLOAT));
				array = (float*)SvPV(ST(7),PL_na);
			}
			else
				array = get_mortalspace(ndata,TFLOAT);
			if (ST(8) != &PL_sv_undef) {
				SvGROW(ST(8),ndata*sizeof_datatype(TLOGICAL));
				nularr = (logical*)SvPV(ST(8),PL_na);
			}
			else
				nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfe(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TFLOAT);
			nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfe(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
			if (ST(7) != &PL_sv_undef) unpack1D(ST(7),array,ndata,TFLOAT,fptr->perlyunpacking);
			if (ST(8) != &PL_sv_undef) unpack1D(ST(8),nularr,ndata,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 18038 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgsfd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 11)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixels, lpixels, inc, array, nularr, anynul, status");
    {
	FitsFile *	fptr;
	int	group = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixels = (long *)packND(ST(4),TLONG)
;
	long *	lpixels = (long *)packND(ST(5),TLONG)
;
	long *	inc = (long *)packND(ST(6),TLONG)
;
	double *	array;
	logical *	nularr;
	int	anynul;
	int	status = (int)SvIV(ST(10))
;
#line 9228 "CFITSIO.xs"
		long ndata;
		int i;
#line 18077 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 9231 "CFITSIO.xs"
		ndata = 1;
		for (i=0; i<naxis; i++)
			ndata *= (lpixels[i]-fpixels[i]+1)/inc[i] +
				(((lpixels[i]-fpixels[i]+1) % inc[i]) ? 1 : 0);
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(7) != &PL_sv_undef) {
				SvGROW(ST(7),ndata*sizeof_datatype(TDOUBLE));
				array = (double*)SvPV(ST(7),PL_na);
			}
			else
				array = get_mortalspace(ndata,TDOUBLE);
			if (ST(8) != &PL_sv_undef) {
				SvGROW(ST(8),ndata*sizeof_datatype(TLOGICAL));
				nularr = (logical*)SvPV(ST(8),PL_na);
			}
			else
				nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfd(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
		}
		else {
			array = get_mortalspace(ndata,TDOUBLE);
			nularr = get_mortalspace(ndata,TLOGICAL);
			RETVAL=ffgsfd(fptr->fptr,group,naxis,naxes,fpixels,lpixels,inc,array,nularr,&anynul,&status);
			if (ST(7) != &PL_sv_undef) unpack1D(ST(7),array,ndata,TDOUBLE,fptr->perlyunpacking);
			if (ST(8) != &PL_sv_undef) unpack1D(ST(8),nularr,ndata,TLOGICAL,fptr->perlyunpacking);
		}
		if (ST(9) != &PL_sv_undef) sv_setiv(ST(9),anynul);
#line 18115 "CFITSIO.c"
	sv_setiv(ST(10), (IV)status);
	SvSETMAGIC(ST(10));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtcs); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtcs)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 12)
       croak_xs_usage(cv,  "fptr, xcol, ycol, xrefval, yrefval, xrefpix, yrefpix, xinc, yinc, rot, coordtype, status");
    {
	fitsfile *	fptr;
	int	xcol = (int)SvIV(ST(1))
;
	int	ycol = (int)SvIV(ST(2))
;
	double	xrefval;
	double	yrefval;
	double	xrefpix;
	double	yrefpix;
	double	xinc;
	double	yinc;
	double	rot;
	char *	coordtype;
	int	status = (int)SvIV(ST(11))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 9280 "CFITSIO.xs"
		coordtype = get_mortalspace(FLEN_VALUE,TBYTE);
		RETVAL=ffgtcs(fptr,xcol,ycol,&xrefval,&yrefval,&xrefpix,&yrefpix,&xinc,&yinc,&rot,coordtype,&status);
		if (ST(3) != &PL_sv_undef) sv_setnv(ST(3),xrefval);  /* value-added, all around */
		if (ST(4) != &PL_sv_undef) sv_setnv(ST(4),yrefval);
		if (ST(5) != &PL_sv_undef) sv_setnv(ST(5),xrefpix);
		if (ST(6) != &PL_sv_undef) sv_setnv(ST(6),yrefpix);
		if (ST(7) != &PL_sv_undef) sv_setnv(ST(7),xinc);
		if (ST(8) != &PL_sv_undef) sv_setnv(ST(8),yinc);
		if (ST(9) != &PL_sv_undef) sv_setnv(ST(9),rot);
#line 18167 "CFITSIO.c"
	if (coordtype != NULL)
		sv_setpv((SV *)ST(10), coordtype);
	SvSETMAGIC(ST(10));
	sv_setiv(ST(11), (IV)status);
	SvSETMAGIC(ST(11));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtbb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtbb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, frow, fchar, nchars, values, status");
    {
	FitsFile *	fptr;
	LONGLONG	frow = (LONGLONG)SvIV(ST(1))
;
	LONGLONG	fchar = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nchars = (LONGLONG)SvIV(ST(3))
;
	byte *	values;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 9306 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(4),nchars*sizeof_datatype(TBYTE));
			RETVAL=ffgtbb(fptr->fptr,frow,fchar,nchars,(byte*)SvPV(ST(4),PL_na),&status);
		}
		else {
			values = get_mortalspace(nchars,TBYTE);
			RETVAL=ffgtbb(fptr->fptr,frow,fchar,nchars,values,&status);
			unpack1D(ST(4),values,nchars,TBYTE,fptr->perlyunpacking);
		}
#line 18217 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtdm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtdm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, colnum, naxis, naxes, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	int	naxis;
	long *	naxes;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 9330 "CFITSIO.xs"
		if (ST(3)!=&PL_sv_undef) {
			ffgtdm(fptr->fptr,colnum,0,&naxis,NULL,&status);
			naxes = get_mortalspace(naxis,TLONG);
		}
		else {
			naxes = NULL;
			naxis = 0;
		}
		RETVAL=ffgtdm(fptr->fptr,colnum,naxis,&naxis,naxes,&status);
		if (ST(2)!=&PL_sv_undef) sv_setiv(ST(2),naxis);
		if (ST(3)!=&PL_sv_undef) unpack1D(ST(3),naxes,naxis,TLONG,fptr->perlyunpacking);
#line 18263 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtdmll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtdmll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, colnum, naxis, naxes, status");
    {
	FitsFile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	int	naxis;
	LONGLONG *	naxes;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 9356 "CFITSIO.xs"
		if (ST(3)!=&PL_sv_undef) {
			ffgtdmll(fptr->fptr,colnum,0,&naxis,NULL,&status);
			naxes = get_mortalspace(naxis,TLONGLONG);
		}
		else {
			naxes = NULL;
			naxis = 0;
		}
		RETVAL=ffgtdmll(fptr->fptr,colnum,naxis,&naxis,naxes,&status);
		if (ST(2)!=&PL_sv_undef) sv_setiv(ST(2),naxis);
		if (ST(3)!=&PL_sv_undef) unpack1D(ST(3),naxes,naxis,TLONGLONG,fptr->perlyunpacking);
#line 18309 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtrm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtrm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "gfptr, rmopt, status");
    {
	fitsfile *	gfptr;
	int	rmopt = (int)SvIV(ST(1))
;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    gfptr = fitsfileSV(ST(0));
        }
        else
            croak("gfptr is not of type fitsfilePtr")
;

	RETVAL = ffgtrm(gfptr, rmopt, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgmrm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgmrm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, member, rmopt, status");
    {
	fitsfile *	fptr;
	long	member = (long)SvIV(ST(1))
;
	int	rmopt = (int)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffgmrm(fptr, member, rmopt, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffreopen); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffreopen)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "openfptr, newfptr, status");
    {
	fitsfile *	openfptr;
	FitsFile *	newfptr;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    openfptr = fitsfileSV(ST(0));
        }
        else
            croak("openfptr is not of type fitsfilePtr")
;
#line 9403 "CFITSIO.xs"
		NewFitsFile(newfptr);
		RETVAL = ffreopen(openfptr,&(newfptr->fptr),&status);
		if (RETVAL)
		   AbortFitsFile(newfptr);
#line 18413 "CFITSIO.c"
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	if (newfptr != NULL)
	        sv_setref_pv(ST(1), "fitsfilePtr", (void*)newfptr);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffrprt); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffrprt)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "stream, status");
    {
	FILE *	stream = PerlIO_findFILE(IoIFP(sv_2io(ST(0))))
;
	int	status = (int)SvIV(ST(1))
;

	ffrprt(stream, status);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffrsim); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffrsim)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, bitpix, naxis, naxes, status");
    {
	fitsfile *	fptr;
	int	bitpix = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffrsim(fptr, bitpix, naxis, naxes, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffrsimll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffrsimll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, bitpix, naxis, naxes, status");
    {
	fitsfile *	fptr;
	int	bitpix = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	LONGLONG *	naxes = (LONGLONG *)packND(ST(3),TLONGLONG)
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffrsimll(fptr, bitpix, naxis, naxes, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffsrow); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffsrow)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "infptr, outfptr, expr, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	char *	expr;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	{
		if (ST(2) == &PL_sv_undef)
			expr = (char *)NULL;
		else
			expr = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = ffsrow(infptr, outfptr, expr, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpscl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpscl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, scale, zero, status");
    {
	fitsfile *	fptr;
	double	scale = (double)SvNV(ST(1))
;
	double	zero = (double)SvNV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpscl(fptr, scale, zero, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffsnul); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffsnul)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, colnum, nulstr, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	char *	nulstr;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(2) == &PL_sv_undef)
			nulstr = (char *)NULL;
		else
			nulstr = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = ffsnul(fptr, colnum, nulstr, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fftnul); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fftnul)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, colnum, nulval, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	nulval = (LONGLONG)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = fftnul(fptr, colnum, nulval, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_set_compression_type); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_set_compression_type)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, comptype, status");
    {
	fitsfile *	fptr;
	int	comptype = (int)SvIV(ST(1))
;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = fits_set_compression_type(fptr, comptype, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffhdef); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffhdef)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, morekeys, status");
    {
	fitsfile *	fptr;
	int	morekeys = (int)SvIV(ST(1))
;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffhdef(fptr, morekeys, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffrdef); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffrdef)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "fptr, status");
    {
	fitsfile *	fptr;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffrdef(fptr, &status);
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpnul); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpnul)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, nulval, status");
    {
	fitsfile *	fptr;
	LONGLONG	nulval = (LONGLONG)SvIV(ST(1))
;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpnul(fptr, nulval, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_set_noise_bits); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_set_noise_bits)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, noisebits, status");
    {
	fitsfile *	fptr;
	int	noisebits = (int)SvIV(ST(1))
;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = fits_set_noise_bits(fptr, noisebits, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_set_tile_dim); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fits_set_tile_dim)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, ndim, tilesize, status");
    {
	fitsfile *	fptr;
	int	ndim = (int)SvIV(ST(1))
;
	long *	tilesize = (long *)packND(ST(2),TLONG)
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = fits_set_tile_dim(fptr, ndim, tilesize, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fftscl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fftscl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, colnum, scale, zero, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	double	scale = (double)SvNV(ST(2))
;
	double	zero = (double)SvNV(ST(3))
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = fftscl(fptr, colnum, scale, zero, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffs2dt); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffs2dt)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "datestr, year, month, day, status");
    {
	char *	datestr;
	int	year;
	int	month;
	int	day;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			datestr = (char *)NULL;
		else
			datestr = (char *)SvPV(ST(0),PL_na);
	}
;
#line 9579 "CFITSIO.xs"
		RETVAL = ffs2dt(datestr,&year,&month,&day,&status);
		if (ST(1) != &PL_sv_undef) sv_setiv(ST(1),year);
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),month);
		if (ST(3) != &PL_sv_undef) sv_setiv(ST(3),day);
#line 18943 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffs2tm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffs2tm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "datestr, year, month, day, hour, minute, second, status");
    {
	char *	datestr;
	int	year;
	int	month;
	int	day;
	int	hour;
	int	minute;
	double	second;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			datestr = (char *)NULL;
		else
			datestr = (char *)SvPV(ST(0),PL_na);
	}
;
#line 9600 "CFITSIO.xs"
		RETVAL = ffs2tm(datestr,&year,&month,&day,&hour,&minute,&second,&status);
		if (ST(1) != &PL_sv_undef) sv_setiv(ST(1),year);
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),month);
		if (ST(3) != &PL_sv_undef) sv_setiv(ST(3),day);
		if (ST(4) != &PL_sv_undef) sv_setiv(ST(4),hour);
		if (ST(5) != &PL_sv_undef) sv_setiv(ST(5),minute);
		if (ST(6) != &PL_sv_undef) sv_setnv(ST(6),second);
#line 18988 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fftexp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fftexp)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, expr, datatype, nelem, naxis, naxes, status");
    {
	FitsFile *	fptr;
	char *	expr;
	int	datatype;
	long	nelem;
	int	naxis;
	long *	naxes;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			expr = (char *)NULL;
		else
			expr = (char *)SvPV(ST(1),PL_na);
	}
;
#line 9624 "CFITSIO.xs"
		if (ST(5)!=&PL_sv_undef) {
			fftexp(fptr->fptr,expr,0,&datatype,&nelem,&naxis,NULL,&status);
			naxes = get_mortalspace(naxis,TLONG);
		}
		else {
			naxes = NULL;
			naxis = 0;
		}
		RETVAL=fftexp(fptr->fptr,expr,naxis,&datatype,&nelem,&naxis,naxes,&status);
		if (ST(2)!=&PL_sv_undef) sv_setiv(ST(2),datatype);
		if (ST(3)!=&PL_sv_undef) sv_setiv(ST(3),nelem);
		if (ST(4)!=&PL_sv_undef) sv_setiv(ST(4),naxis);
		if (ST(5)!=&PL_sv_undef) unpack1D(ST(5),naxes,naxis,TLONG,fptr->perlyunpacking);
#line 19045 "CFITSIO.c"
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fftheap); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fftheap)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, heapsize, unused, overlap, validheap, status");
    {
	fitsfile *	fptr;
	LONGLONG	heapsize;
	LONGLONG	unused;
	LONGLONG	overlap;
	int	validheap;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = fftheap(fptr, &heapsize, &unused, &overlap, &validheap, &status);
	sv_setiv(ST(1), (IV)heapsize);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)unused);
	SvSETMAGIC(ST(2));
	sv_setiv(ST(3), (IV)overlap);
	SvSETMAGIC(ST(3));
	sv_setiv(ST(4), (IV)validheap);
	SvSETMAGIC(ST(4));
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fftkey); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fftkey)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "keyname, status");
    {
	char *	keyname;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(0),PL_na);
	}
;

	RETVAL = fftkey(keyname, &status);
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fftrec); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fftrec)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "card, status");
    {
	char *	card;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			card = (char *)NULL;
		else
			card = (char *)SvPV(ST(0),PL_na);
	}
;

	RETVAL = fftrec(card, &status);
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_fftm2s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_fftm2s)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "year, month, day, hr, min, sec, decimals, datestr, status");
    {
	int	year = (int)SvIV(ST(0))
;
	int	month = (int)SvIV(ST(1))
;
	int	day = (int)SvIV(ST(2))
;
	int	hr = (int)SvIV(ST(3))
;
	int	min = (int)SvIV(ST(4))
;
	double	sec = (double)SvNV(ST(5))
;
	int	decimals = (int)SvIV(ST(6))
;
	char *	datestr;
	int	status = (int)SvIV(ST(8))
;
#line 9691 "CFITSIO.xs"
		int datestrlen;
#line 19189 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;
#line 9693 "CFITSIO.xs"
		datestrlen=21; /* YYYY-MM-DDThh:mm:ss.[ddd...] */
		if (decimals > 0) datestrlen += decimals;
		datestr = get_mortalspace(datestrlen,TBYTE);
		RETVAL=fftm2s(year,month,day,hr,min,sec,decimals,datestr,&status);
#line 19197 "CFITSIO.c"
	if (datestr != NULL)
		sv_setpv((SV *)ST(7), datestr);
	SvSETMAGIC(ST(7));
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgmtf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgmtf)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "infptr, outfptr, member, tfopt, status");
    {
	fitsfile *	infptr;
	fitsfile *	outfptr;
	long	member = (long)SvIV(ST(2))
;
	int	tfopt = (int)SvIV(ST(3))
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    infptr = fitsfileSV(ST(0));
        }
        else
            croak("infptr is not of type fitsfilePtr")
;

	if (sv_derived_from(ST(1), "fitsfilePtr")) {
	    outfptr = fitsfileSV(ST(1));
        }
        else
            croak("outfptr is not of type fitsfilePtr")
;

	RETVAL = ffgmtf(infptr, outfptr, member, tfopt, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffucrd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffucrd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keyname, card, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	card;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			card = (char *)NULL;
		else
			card = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = ffucrd(fptr, keyname, card, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffupck); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffupck)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "fptr, status");
    {
	fitsfile *	fptr;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffupck(fptr, &status);
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffuky); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffuky)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, datatype, keyname, value, comm, status");
    {
	fitsfile *	fptr;
	int	datatype = (int)SvIV(ST(1))
;
	char *	keyname;
	void *	value;
	char *	comm;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(2) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(2),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comm = (char *)NULL;
		else
			comm = (char *)SvPV(ST(4),PL_na);
	}
;
#line 9749 "CFITSIO.xs"
		value = pack1D(ST(3),(datatype == TLOGICAL) ? TINT : datatype);
		RETVAL=ffuky(fptr,datatype,keyname,value,comm,&status);
#line 19377 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukyu); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukyu)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keyname, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	comment;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = ffukyu(fptr, keyname, comment, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukys); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukys)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	value;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			value = (char *)NULL;
		else
			value = (char *)SvPV(ST(2),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffukys(fptr, keyname, value, comment, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukyl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukyl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	int	value = (int)SvIV(ST(2))
;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffukyl(fptr, keyname, value, comment, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukyj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukyj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	LONGLONG	value = (LONGLONG)SvIV(ST(2))
;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffukyj(fptr, keyname, value, comment, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukye); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukye)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float	value = (float)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffukye(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukyd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukyd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double	value = (double)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffukyd(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukyf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukyf)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float	value = (float)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffukyf(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukyg); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukyg)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double	value = (double)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffukyg(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukyc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukyc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float *	value = (float *)packND(ST(2),TFLOAT)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffukyc(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukym); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukym)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double *	value = (double *)packND(ST(2),TDOUBLE)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffukym(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukfc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukfc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	cmp *	value = (cmp *)packND(ST(2),TCOMPLEX)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffukfc(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukfm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukfm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	dblcmp *	value = (dblcmp *)packND(ST(2),TDBLCOMPLEX)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffukfm(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffupch); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffupch)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "string");
    {
	char *	string;

	{
		if (ST(0) == &PL_sv_undef)
			string = (char *)NULL;
		else
			string = (char *)SvPV(ST(0),PL_na);
	}
;

	ffupch(string);
	if (string != NULL)
		sv_setpv((SV *)ST(0), string);
	SvSETMAGIC(ST(0));
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffurlt); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffurlt)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, urlType, status");
    {
	fitsfile *	fptr;
	char *	urlType;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 9935 "CFITSIO.xs"
		urlType = get_mortalspace(FLEN_FILENAME,TBYTE);
		RETVAL = ffurlt(fptr,urlType,&status);
#line 20071 "CFITSIO.c"
	if (urlType != NULL)
		sv_setpv((SV *)ST(1), urlType);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffvcks); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffvcks)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, dataok, hduok, status");
    {
	fitsfile *	fptr;
	int	dataok;
	int	hduok;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 9953 "CFITSIO.xs"
		RETVAL = ffvcks(fptr,&dataok,&hduok,&status);
		if (ST(1) != &PL_sv_undef) sv_setiv(ST(1),dataok); /* value-added */
		if (ST(2) != &PL_sv_undef) sv_setiv(ST(2),hduok); /* value-added */
#line 20110 "CFITSIO.c"
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtvf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtvf)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "gfptr, firstfailed, status");
    {
	fitsfile *	gfptr;
	long	firstfailed;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    gfptr = fitsfileSV(ST(0));
        }
        else
            croak("gfptr is not of type fitsfilePtr")
;

	RETVAL = ffgtvf(gfptr, &firstfailed, &status);
	sv_setiv(ST(1), (IV)firstfailed);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffxypx); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffxypx)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 13)
       croak_xs_usage(cv,  "xpos, ypos, xrefval, yrefval, xrefpix, yrefpix, xinc, yinc, rot, coordtype, xpix, ypix, status");
    {
	double	xpos = (double)SvNV(ST(0))
;
	double	ypos = (double)SvNV(ST(1))
;
	double	xrefval = (double)SvNV(ST(2))
;
	double	yrefval = (double)SvNV(ST(3))
;
	double	xrefpix = (double)SvNV(ST(4))
;
	double	yrefpix = (double)SvNV(ST(5))
;
	double	xinc = (double)SvNV(ST(6))
;
	double	yinc = (double)SvNV(ST(7))
;
	double	rot = (double)SvNV(ST(8))
;
	char *	coordtype;
	double	xpix;
	double	ypix;
	int	status = (int)SvIV(ST(12))
;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(9) == &PL_sv_undef)
			coordtype = (char *)NULL;
		else
			coordtype = (char *)SvPV(ST(9),PL_na);
	}
;

	RETVAL = ffxypx(xpos, ypos, xrefval, yrefval, xrefpix, yrefpix, xinc, yinc, rot, coordtype, &xpix, &ypix, &status);
	sv_setnv(ST(10), (double)xpix);
	SvSETMAGIC(ST(10));
	sv_setnv(ST(11), (double)ypix);
	SvSETMAGIC(ST(11));
	sv_setiv(ST(12), (IV)status);
	SvSETMAGIC(ST(12));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2db); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2db)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, dim1, naxis1, naxis2, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(4))
;
	byte *	array = (byte *)packND(ST(5),TBYTE)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp2db(fptr, group, dim1, naxis1, naxis2, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2dsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2dsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, dim1, naxis1, naxis2, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(4))
;
	signed char*	array = (signed char *)packND(ST(5),TSBYTE)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp2dsb(fptr, group, dim1, naxis1, naxis2, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2di); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2di)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, dim1, naxis1, naxis2, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(4))
;
	short *	array = (short *)packND(ST(5),TSHORT)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp2di(fptr, group, dim1, naxis1, naxis2, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2dui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2dui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, dim1, naxis1, naxis2, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(4))
;
	unsigned short *	array = (unsigned short *)packND(ST(5),TUSHORT)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp2dui(fptr, group, dim1, naxis1, naxis2, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2dk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2dk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, dim1, naxis1, naxis2, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(4))
;
	int *	array = (int *)packND(ST(5),TINT)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp2dk(fptr, group, dim1, naxis1, naxis2, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2duk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2duk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, dim1, naxis1, naxis2, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(4))
;
	unsigned int *	array = (unsigned int *)packND(ST(5),TUINT)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp2duk(fptr, group, dim1, naxis1, naxis2, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2dj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2dj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, dim1, naxis1, naxis2, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(4))
;
	long *	array = (long *)packND(ST(5),TLONG)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp2dj(fptr, group, dim1, naxis1, naxis2, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2djj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2djj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, dim1, naxis1, naxis2, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG*	array = (LONGLONG *)packND(ST(5),TLONGLONG)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp2djj(fptr, group, dim1, naxis1, naxis2, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2duj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2duj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, dim1, naxis1, naxis2, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(4))
;
	unsigned long *	array = (unsigned long *)packND(ST(5),TULONG)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp2duj(fptr, group, dim1, naxis1, naxis2, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2de); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2de)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, dim1, naxis1, naxis2, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(4))
;
	float *	array = (float *)packND(ST(5),TFLOAT)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp2de(fptr, group, dim1, naxis1, naxis2, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2dd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp2dd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, dim1, naxis1, naxis2, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(4))
;
	double *	array = (double *)packND(ST(5),TDOUBLE)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp2dd(fptr, group, dim1, naxis1, naxis2, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3db); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3db)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(6))
;
	byte *	array = (byte *)packND(ST(7),TBYTE)
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp3db(fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3dsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3dsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(6))
;
	signed char*	array = (signed char *)packND(ST(7),TSBYTE)
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp3dsb(fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3di); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3di)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(6))
;
	short *	array = (short *)packND(ST(7),TSHORT)
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp3di(fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3dui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3dui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(6))
;
	unsigned short *	array = (unsigned short *)packND(ST(7),TUSHORT)
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp3dui(fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3dk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3dk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(6))
;
	int *	array = (int *)packND(ST(7),TINT)
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp3dk(fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3duk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3duk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(6))
;
	unsigned int *	array = (unsigned int *)packND(ST(7),TUINT)
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp3duk(fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3dj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3dj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(6))
;
	long *	array = (long *)packND(ST(7),TLONG)
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp3dj(fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3djj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3djj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(6))
;
	LONGLONG*	array = (LONGLONG *)packND(ST(7),TLONGLONG)
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp3djj(fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3duj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3duj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(6))
;
	unsigned long *	array = (unsigned long *)packND(ST(7),TULONG)
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp3duj(fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3de); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3de)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(6))
;
	float *	array = (float *)packND(ST(7),TFLOAT)
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp3de(fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3dd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffp3dd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	dim1 = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	dim2 = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	naxis1 = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	naxis2 = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	naxis3 = (LONGLONG)SvIV(ST(6))
;
	double *	array = (double *)packND(ST(7),TDOUBLE)
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffp3dd(fptr, group, dim1, dim2, naxis1, naxis2, naxis3, array, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphtb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphtb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 10)
       croak_xs_usage(cv,  "fptr, rowlen, nrows, tfields, ttype, tbcol, tform, tunit, extname, status");
    {
	fitsfile *	fptr;
	LONGLONG	rowlen = (LONGLONG)SvIV(ST(1))
;
	LONGLONG	nrows = (LONGLONG)SvIV(ST(2))
;
	int	tfields = (int)SvIV(ST(3))
;
	char **	ttype = (char **)packND(ST(4),TSTRING)
;
	long *	tbcol = (long *)packND(ST(5),TLONG)
;
	char **	tform = (char **)packND(ST(6),TSTRING)
;
	char **	tunit = (char **)packND(ST(7),TSTRING)
;
	char *	extname;
	int	status = (int)SvIV(ST(9))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(8) == &PL_sv_undef)
			extname = (char *)NULL;
		else
			extname = (char *)SvPV(ST(8),PL_na);
	}
;

	RETVAL = ffphtb(fptr, rowlen, nrows, tfields, ttype, tbcol, tform, tunit, extname, &status);
	sv_setiv(ST(9), (IV)status);
	SvSETMAGIC(ST(9));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphbn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphbn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, nrows, tfields, ttype, tform, tunit, extname, pcount, status");
    {
	fitsfile *	fptr;
	LONGLONG	nrows = (LONGLONG)SvIV(ST(1))
;
	int	tfields = (int)SvIV(ST(2))
;
	char **	ttype = (char **)packND(ST(3),TSTRING)
;
	char **	tform = (char **)packND(ST(4),TSTRING)
;
	char **	tunit = (char **)packND(ST(5),TSTRING)
;
	char *	extname;
	LONGLONG	pcount = (LONGLONG)SvIV(ST(7))
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(6) == &PL_sv_undef)
			extname = (char *)NULL;
		else
			extname = (char *)SvPV(ST(6),PL_na);
	}
;

	RETVAL = ffphbn(fptr, nrows, tfields, ttype, tform, tunit, extname, pcount, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphext); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphext)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, xtension, bitpix, naxis, naxes, pcount, gcount, status");
    {
	fitsfile *	fptr;
	char *	xtension;
	int	bitpix = (int)SvIV(ST(2))
;
	int	naxis = (int)SvIV(ST(3))
;
	long *	naxes = (long *)packND(ST(4),TLONG)
;
	LONGLONG	pcount = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	gcount = (LONGLONG)SvIV(ST(6))
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			xtension = (char *)NULL;
		else
			xtension = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffphext(fptr, xtension, bitpix, naxis, naxes, pcount, gcount, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcks); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcks)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "fptr, status");
    {
	fitsfile *	fptr;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcks(fptr, &status);
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffprwu); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffprwu)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, firstrow, nelem, status");
    {
	fitsfile *	fptr;
	LONGLONG	firstrow = (LONGLONG)SvIV(ST(1))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffprwu(fptr, firstrow, nelem, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclu); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclu)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, colnum, frow, felem, nelem, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpclu(fptr, colnum, frow, felem, nelem, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, datatype, colnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	datatype = (int)SvIV(ST(1))
;
	int	colnum = (int)SvIV(ST(2))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(5))
;
	SV *	array = ST(6)
;
	int	status = (int)SvIV(ST(7))
;
#line 10447 "CFITSIO.xs"
		int storage_datatype;
#line 21442 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 10449 "CFITSIO.xs"
		storage_datatype = datatype;
		if (datatype == TBIT)
			storage_datatype = TLOGICAL;
		RETVAL=ffpcl(fptr,datatype,colnum,frow,felem,nelem,packND(array,storage_datatype),&status);
#line 21457 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclx); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclx)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, fbit, nbits, larray, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	long	fbit = (long)SvIV(ST(3))
;
	long	nbits = (long)SvIV(ST(4))
;
	logical *	larray = (logical *)packND(ST(5),TLOGICAL)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpclx(fptr, cnum, frow, fbit, nbits, larray, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcls); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcls)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	char **	array = (char **)packND(ST(5),TSTRING)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcls(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	logical *	array = (logical *)packND(ST(5),TLOGICAL)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcll(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	byte *	array = (byte *)packND(ST(5),TBYTE)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpclb(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	signed char*	array = (signed char *)packND(ST(5),TSBYTE)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpclsb(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	unsigned short *	array = (unsigned short *)packND(ST(5),TUSHORT)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpclui(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcli); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcli)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	short *	array = (short *)packND(ST(5),TSHORT)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcli(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcluk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcluk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	unsigned int *	array = (unsigned int *)packND(ST(5),TUINT)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcluk(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	int *	array = (int *)packND(ST(5),TINT)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpclk(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcluj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcluj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	unsigned long *	array = (unsigned long *)packND(ST(5),TULONG)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcluj(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	long *	array = (long *)packND(ST(5),TLONG)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpclj(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcljj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcljj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	LONGLONG*	array = (LONGLONG *)packND(ST(5),TLONGLONG)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcljj(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcle); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcle)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	float *	array = (float *)packND(ST(5),TFLOAT)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcle(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcld); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcld)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	double *	array = (double *)packND(ST(5),TDOUBLE)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcld(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	float *	array = (float *)packND(ST(5),TFLOAT)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpclc(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpclm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	double *	array = (double *)packND(ST(5),TDOUBLE)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpclm(fptr, cnum, frow, felem, nelem, array, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, datatype, colnum, frow, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	datatype = (int)SvIV(ST(1))
;
	int	colnum = (int)SvIV(ST(2))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(4))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(5))
;
	SV *	array = ST(6)
;
	SV *	nulval = ST(7)
;
	int	status = (int)SvIV(ST(8))
;
#line 10712 "CFITSIO.xs"
		int storage_datatype;
#line 22150 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 10714 "CFITSIO.xs"
		storage_datatype = datatype;
		if (datatype == TBIT)
			storage_datatype = TLOGICAL;
		RETVAL=ffpcn(
			fptr,
			datatype,
			colnum,
			frow, felem, nelem,
			packND(array,storage_datatype),
			(nulval!=&PL_sv_undef) ? pack1D(nulval, storage_datatype) : NULL,
			&status);
#line 22172 "CFITSIO.c"
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcns); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcns)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, nulstr, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	char **	array = (char **)packND(ST(5),TSTRING)
;
	char *	nulstr;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(6) == &PL_sv_undef)
			nulstr = (char *)NULL;
		else
			nulstr = (char *)SvPV(ST(6),PL_na);
	}
;

	RETVAL = ffpcns(fptr, cnum, frow, felem, nelem, array, nulstr, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	logical *	array = (logical *)packND(ST(5),TLOGICAL)
;
	logical	nulval = (logical)SvIV(ST(6))
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcnl(fptr, cnum, frow, felem, nelem, array, nulval, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	byte *	array = (byte *)packND(ST(5),TBYTE)
;
	byte	nulval = (byte)SvIV(ST(6))
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcnb(fptr, cnum, frow, felem, nelem, array, nulval, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	signed char*	array = (signed char *)packND(ST(5),TSBYTE)
;
	signed char	nulval = (signed char)SvIV(ST(6))
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcnsb(fptr, cnum, frow, felem, nelem, array, nulval, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	unsigned short *	array = (unsigned short *)packND(ST(5),TUSHORT)
;
	unsigned short	nulval = (unsigned short)SvUV(ST(6))
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcnui(fptr, cnum, frow, felem, nelem, array, nulval, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcni); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcni)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	short *	array = (short *)packND(ST(5),TSHORT)
;
	short	nulval = (short)SvIV(ST(6))
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcni(fptr, cnum, frow, felem, nelem, array, nulval, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnuk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnuk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	unsigned int *	array = (unsigned int *)packND(ST(5),TUINT)
;
	unsigned int	nulval = (unsigned int)SvUV(ST(6))
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcnuk(fptr, cnum, frow, felem, nelem, array, nulval, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	int *	array = (int *)packND(ST(5),TINT)
;
	int	nulval = (int)SvIV(ST(6))
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcnk(fptr, cnum, frow, felem, nelem, array, nulval, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnuj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnuj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	unsigned long *	array = (unsigned long *)packND(ST(5),TULONG)
;
	unsigned long	nulval = (unsigned long)SvUV(ST(6))
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcnuj(fptr, cnum, frow, felem, nelem, array, nulval, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	long *	array = (long *)packND(ST(5),TLONG)
;
	long	nulval = (long)SvIV(ST(6))
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcnj(fptr, cnum, frow, felem, nelem, array, nulval, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	LONGLONG*	array = (LONGLONG *)packND(ST(5),TLONGLONG)
;
	LONGLONG	nulval = (LONGLONG)SvIV(ST(6))
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcnjj(fptr, cnum, frow, felem, nelem, array, nulval, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcne); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcne)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	float *	array = (float *)packND(ST(5),TFLOAT)
;
	float	nulval = (float)SvNV(ST(6))
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcne(fptr, cnum, frow, felem, nelem, array, nulval, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcnd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, cnum, frow, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	cnum = (int)SvIV(ST(1))
;
	LONGLONG	frow = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(4))
;
	double *	array = (double *)packND(ST(5),TDOUBLE)
;
	double	nulval = (double)SvNV(ST(6))
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpcnd(fptr, cnum, frow, felem, nelem, array, nulval, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcom); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpcom)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, comment, status");
    {
	fitsfile *	fptr;
	char *	comment;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffpcom(fptr, comment, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpdat); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpdat)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "fptr, status");
    {
	fitsfile *	fptr;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpdat(fptr, &status);
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpdes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpdes)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, colnum, rownum, repeat, offset, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	LONGLONG	rownum = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	repeat = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	offset = (LONGLONG)SvIV(ST(4))
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpdes(fptr, colnum, rownum, repeat, offset, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpmsg); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpmsg)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "err_msg");
    {
	char *	err_msg;

	{
		if (ST(0) == &PL_sv_undef)
			err_msg = (char *)NULL;
		else
			err_msg = (char *)SvPV(ST(0),PL_na);
	}
;

	ffpmsg(err_msg);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	byte *	array = (byte *)packND(ST(4),TBYTE)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpgpb(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	signed char*	array = (signed char *)packND(ST(4),TSBYTE)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpgpsb(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	unsigned short *	array = (unsigned short *)packND(ST(4),TUSHORT)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpgpui(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpi); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpi)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	short *	array = (short *)packND(ST(4),TSHORT)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpgpi(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpuk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpuk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	unsigned int *	array = (unsigned int *)packND(ST(4),TUINT)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpgpuk(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	int *	array = (int *)packND(ST(4),TINT)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpgpk(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpuj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpuj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	unsigned long *	array = (unsigned long *)packND(ST(4),TULONG)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpgpuj(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	long *	array = (long *)packND(ST(4),TLONG)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpgpj(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	LONGLONG*	array = (LONGLONG *)packND(ST(4),TLONGLONG)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpgpjj(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpe); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpe)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	float *	array = (float *)packND(ST(4),TFLOAT)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpgpe(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpgpd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	felem = (long)SvIV(ST(2))
;
	long	nelem = (long)SvIV(ST(3))
;
	double *	array = (double *)packND(ST(4),TDOUBLE)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpgpd(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphis); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphis)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, history, status");
    {
	fitsfile *	fptr;
	char *	history;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			history = (char *)NULL;
		else
			history = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffphis(fptr, history, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppr); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppr)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, datatype, firstelem, nelem, array, status");
    {
	fitsfile *	fptr;
	int	datatype = (int)SvIV(ST(1))
;
	LONGLONG	firstelem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	SV *	array = ST(4)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 11155 "CFITSIO.xs"
		RETVAL=ffppr(fptr,datatype,firstelem,nelem,packND(array,datatype),&status);
#line 23381 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppru); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppru)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppru(fptr, group, felem, nelem, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	byte *	array = (byte *)packND(ST(4),TBYTE)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpprb(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	signed char*	array = (signed char *)packND(ST(4),TSBYTE)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpprsb(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	unsigned short *	array = (unsigned short *)packND(ST(4),TUSHORT)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpprui(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppri); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppri)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	short *	array = (short *)packND(ST(4),TSHORT)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppri(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppruk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppruk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	unsigned int *	array = (unsigned int *)packND(ST(4),TUINT)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppruk(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	int *	array = (int *)packND(ST(4),TINT)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpprk(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppruj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppruj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	unsigned long *	array = (unsigned long *)packND(ST(4),TULONG)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppruj(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	long *	array = (long *)packND(ST(4),TLONG)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpprj(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG*	array = (LONGLONG *)packND(ST(4),TLONGLONG)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpprjj(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppre); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppre)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	float *	array = (float *)packND(ST(4),TFLOAT)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppre(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	double *	array = (double *)packND(ST(4),TDOUBLE)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpprd(fptr, group, felem, nelem, array, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphps); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphps)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, bitpix, naxis, naxes, status");
    {
	fitsfile *	fptr;
	int	bitpix = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffphps(fptr, bitpix, naxis, naxes, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphpsll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphpsll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, bitpix, naxis, naxes, status");
    {
	fitsfile *	fptr;
	int	bitpix = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	LONGLONG *	naxes = (LONGLONG *)packND(ST(3),TLONGLONG)
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffphpsll(fptr, bitpix, naxis, naxes, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphpr); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphpr)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, simple, bitpix, naxis, naxes, pcount, gcount, extend, status");
    {
	fitsfile *	fptr;
	int	simple = (int)SvIV(ST(1))
;
	int	bitpix = (int)SvIV(ST(2))
;
	int	naxis = (int)SvIV(ST(3))
;
	long *	naxes = (long *)packND(ST(4),TLONG)
;
	LONGLONG	pcount = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	gcount = (LONGLONG)SvIV(ST(6))
;
	int	extend = (int)SvIV(ST(7))
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffphpr(fptr, simple, bitpix, naxis, naxes, pcount, gcount, extend, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphprll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffphprll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 9)
       croak_xs_usage(cv,  "fptr, simple, bitpix, naxis, naxes, pcount, gcount, extend, status");
    {
	fitsfile *	fptr;
	int	simple = (int)SvIV(ST(1))
;
	int	bitpix = (int)SvIV(ST(2))
;
	int	naxis = (int)SvIV(ST(3))
;
	LONGLONG*	naxes = (LONGLONG *)packND(ST(4),TLONGLONG)
;
	LONGLONG	pcount = (LONGLONG)SvIV(ST(5))
;
	LONGLONG	gcount = (LONGLONG)SvIV(ST(6))
;
	int	extend = (int)SvIV(ST(7))
;
	int	status = (int)SvIV(ST(8))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffphprll(fptr, simple, bitpix, naxis, naxes, pcount, gcount, extend, &status);
	sv_setiv(ST(8), (IV)status);
	SvSETMAGIC(ST(8));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, datatype, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	datatype = (int)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	SV *	array = ST(4)
;
	SV *	nulval = ST(5)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 11400 "CFITSIO.xs"
		RETVAL=ffppn(fptr,datatype,felem,nelem,packND(array,datatype),pack1D(nulval,datatype),&status);
#line 24053 "CFITSIO.c"
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	byte *	array = (byte *)packND(ST(4),TBYTE)
;
	byte	nulval = (byte)SvIV(ST(5))
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppnb(fptr, group, felem, nelem, array, nulval, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnsb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnsb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	signed char*	array = (signed char *)packND(ST(4),TSBYTE)
;
	signed char	nulval = (signed char)SvIV(ST(5))
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppnsb(fptr, group, felem, nelem, array, nulval, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	unsigned short *	array = (unsigned short *)packND(ST(4),TUSHORT)
;
	unsigned short	nulval = (unsigned short)SvUV(ST(5))
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppnui(fptr, group, felem, nelem, array, nulval, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppni); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppni)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	short *	array = (short *)packND(ST(4),TSHORT)
;
	short	nulval = (short)SvIV(ST(5))
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppni(fptr, group, felem, nelem, array, nulval, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnuk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnuk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	unsigned int *	array = (unsigned int *)packND(ST(4),TUINT)
;
	unsigned int	nulval = (unsigned int)SvUV(ST(5))
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppnuk(fptr, group, felem, nelem, array, nulval, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	int *	array = (int *)packND(ST(4),TINT)
;
	int	nulval = (int)SvIV(ST(5))
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppnk(fptr, group, felem, nelem, array, nulval, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnuj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnuj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	unsigned long *	array = (unsigned long *)packND(ST(4),TULONG)
;
	unsigned long	nulval = (unsigned long)SvUV(ST(5))
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppnuj(fptr, group, felem, nelem, array, nulval, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	long *	array = (long *)packND(ST(4),TLONG)
;
	long	nulval = (long)SvIV(ST(5))
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppnj(fptr, group, felem, nelem, array, nulval, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	LONGLONG*	array = (LONGLONG *)packND(ST(4),TLONGLONG)
;
	LONGLONG	nulval = (LONGLONG)SvIV(ST(5))
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppnjj(fptr, group, felem, nelem, array, nulval, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppne); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppne)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	float *	array = (float *)packND(ST(4),TFLOAT)
;
	float	nulval = (float)SvNV(ST(5))
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppne(fptr, group, felem, nelem, array, nulval, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppnd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, group, felem, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	LONGLONG	felem = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	double *	array = (double *)packND(ST(4),TDOUBLE)
;
	double	nulval = (double)SvNV(ST(5))
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffppnd(fptr, group, felem, nelem, array, nulval, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpky); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpky)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, datatype, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	int	datatype = (int)SvIV(ST(1))
;
	char *	keyname;
	void *	value;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(2) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(2),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;
#line 11582 "CFITSIO.xs"
		value = pack1D(ST(3),(datatype == TLOGICAL) ? TINT : datatype);
		RETVAL=ffpky(fptr,datatype,keyname,value,comment,&status);
#line 24558 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkls); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkls)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, longstr, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	longstr;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			longstr = (char *)NULL;
		else
			longstr = (char *)SvPV(ST(2),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffpkls(fptr, keyname, longstr, comment, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukls); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffukls)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keynam, value, comm, status");
    {
	fitsfile *	fptr;
	char *	keynam;
	char *	value;
	char *	comm;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keynam = (char *)NULL;
		else
			keynam = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			value = (char *)NULL;
		else
			value = (char *)SvPV(ST(2),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comm = (char *)NULL;
		else
			comm = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffukls(fptr, keynam, value, comm, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikls); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffikls)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keynam, value, comm, status");
    {
	fitsfile *	fptr;
	char *	keynam;
	char *	value;
	char *	comm;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keynam = (char *)NULL;
		else
			keynam = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			value = (char *)NULL;
		else
			value = (char *)SvPV(ST(2),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comm = (char *)NULL;
		else
			comm = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffikls(fptr, keynam, value, comm, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkls); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffmkls)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keynam, value, comm, status");
    {
	fitsfile *	fptr;
	char *	keynam;
	char *	value;
	char *	comm;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keynam = (char *)NULL;
		else
			keynam = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			value = (char *)NULL;
		else
			value = (char *)SvPV(ST(2),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comm = (char *)NULL;
		else
			comm = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffmkls(fptr, keynam, value, comm, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffplsw); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffplsw)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "fptr, status");
    {
	fitsfile *	fptr;
	int	status = (int)SvIV(ST(1))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffplsw(fptr, &status);
	sv_setiv(ST(1), (IV)status);
	SvSETMAGIC(ST(1));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyu); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyu)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keyname, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	comment;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = ffpkyu(fptr, keyname, comment, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpktp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpktp)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, filename, status");
    {
	fitsfile *	fptr;
	char *	filename;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			filename = (char *)NULL;
		else
			filename = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffpktp(fptr, filename, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyt); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyt)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, intval, frac, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	long	intval = (long)SvIV(ST(2))
;
	double	frac = (double)SvNV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffpkyt(fptr, keyname, intval, frac, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpunt); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpunt)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, keyname, unit, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	unit;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			unit = (char *)NULL;
		else
			unit = (char *)SvPV(ST(2),PL_na);
	}
;

	RETVAL = ffpunt(fptr, keyname, unit, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkys); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkys)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	char *	value;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(2) == &PL_sv_undef)
			value = (char *)NULL;
		else
			value = (char *)SvPV(ST(2),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffpkys(fptr, keyname, value, comment, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	int	value = (int)SvIV(ST(2))
;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffpkyl(fptr, keyname, value, comment, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, keyname, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	LONGLONG	value = (LONGLONG)SvIV(ST(2))
;
	char *	comment;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(3) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(3),PL_na);
	}
;

	RETVAL = ffpkyj(fptr, keyname, value, comment, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkye); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkye)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float	value = (float)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffpkye(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyf)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float	value = (float)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffpkyf(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double	value = (double)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffpkyd(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyg); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyg)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double	value = (double)SvNV(ST(2))
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffpkyg(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkyc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float *	value = (float *)packND(ST(2),TFLOAT)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffpkyc(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkfc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkfc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	float *	value = (float *)packND(ST(2),TFLOAT)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffpkfc(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkym); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkym)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double *	value = (double *)packND(ST(2),TDOUBLE)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffpkym(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkfm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkfm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, keyname, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyname;
	double *	value = (double *)packND(ST(2),TDOUBLE)
;
	int	decimals = (int)SvIV(ST(3))
;
	char *	comment;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyname = (char *)NULL;
		else
			keyname = (char *)SvPV(ST(1),PL_na);
	}
;

	{
		if (ST(4) == &PL_sv_undef)
			comment = (char *)NULL;
		else
			comment = (char *)SvPV(ST(4),PL_na);
	}
;

	RETVAL = ffpkfm(fptr, keyname, value, decimals, comment, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkns); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkns)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, keyroot, nstart, nkeys, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyroot;
	int	nstart = (int)SvIV(ST(2))
;
	int	nkeys = (int)SvIV(ST(3))
;
	char **	value = (char **)packND(ST(4),TSTRING)
;
	char **	comment = (char **)packND(ST(5),TSTRING)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyroot = (char *)NULL;
		else
			keyroot = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffpkns(fptr, keyroot, nstart, nkeys, value, comment, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpknl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpknl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, keyroot, nstart, nkeys, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyroot;
	int	nstart = (int)SvIV(ST(2))
;
	int	nkeys = (int)SvIV(ST(3))
;
	int *	value = (int *)packND(ST(4),TINT)
;
	char **	comment = (char **)packND(ST(5),TSTRING)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyroot = (char *)NULL;
		else
			keyroot = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffpknl(fptr, keyroot, nstart, nkeys, value, comment, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpknj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpknj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, keyroot, nstart, nkeys, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyroot;
	int	nstart = (int)SvIV(ST(2))
;
	int	nkeys = (int)SvIV(ST(3))
;
	long *	value = (long *)packND(ST(4),TLONG)
;
	char **	comment = (char **)packND(ST(5),TSTRING)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyroot = (char *)NULL;
		else
			keyroot = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffpknj(fptr, keyroot, nstart, nkeys, value, comment, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpknjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpknjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, keyroot, nstart, nkeys, value, comment, status");
    {
	fitsfile *	fptr;
	char *	keyroot;
	int	nstart = (int)SvIV(ST(2))
;
	int	nkeys = (int)SvIV(ST(3))
;
	LONGLONG *	value = (LONGLONG *)packND(ST(4),TLONGLONG)
;
	char **	comment = (char **)packND(ST(5),TSTRING)
;
	int	status = (int)SvIV(ST(6))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyroot = (char *)NULL;
		else
			keyroot = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffpknjj(fptr, keyroot, nstart, nkeys, value, comment, &status);
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkne); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkne)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, keyroot, nstart, nkeys, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyroot;
	int	nstart = (int)SvIV(ST(2))
;
	int	nkeys = (int)SvIV(ST(3))
;
	float *	value = (float *)packND(ST(4),TFLOAT)
;
	int	decimals = (int)SvIV(ST(5))
;
	char **	comment = (char **)packND(ST(6),TSTRING)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyroot = (char *)NULL;
		else
			keyroot = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffpkne(fptr, keyroot, nstart, nkeys, value, decimals, comment, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpknf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpknf)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, keyroot, nstart, nkeys, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyroot;
	int	nstart = (int)SvIV(ST(2))
;
	int	nkeys = (int)SvIV(ST(3))
;
	float *	value = (float *)packND(ST(4),TFLOAT)
;
	int	decimals = (int)SvIV(ST(5))
;
	char **	comment = (char **)packND(ST(6),TSTRING)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyroot = (char *)NULL;
		else
			keyroot = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffpknf(fptr, keyroot, nstart, nkeys, value, decimals, comment, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpknd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpknd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, keyroot, nstart, nkeys, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyroot;
	int	nstart = (int)SvIV(ST(2))
;
	int	nkeys = (int)SvIV(ST(3))
;
	double *	value = (double *)packND(ST(4),TDOUBLE)
;
	int	decimals = (int)SvIV(ST(5))
;
	char **	comment = (char **)packND(ST(6),TSTRING)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyroot = (char *)NULL;
		else
			keyroot = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffpknd(fptr, keyroot, nstart, nkeys, value, decimals, comment, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkng); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpkng)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, keyroot, nstart, nkeys, value, decimals, comment, status");
    {
	fitsfile *	fptr;
	char *	keyroot;
	int	nstart = (int)SvIV(ST(2))
;
	int	nkeys = (int)SvIV(ST(3))
;
	double *	value = (double *)packND(ST(4),TDOUBLE)
;
	int	decimals = (int)SvIV(ST(5))
;
	char **	comment = (char **)packND(ST(6),TSTRING)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			keyroot = (char *)NULL;
		else
			keyroot = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffpkng(fptr, keyroot, nstart, nkeys, value, decimals, comment, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpprn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "fptr, felem, nelem, status");
    {
	fitsfile *	fptr;
	LONGLONG	felem = (LONGLONG)SvIV(ST(1))
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(2))
;
	int	status = (int)SvIV(ST(3))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpprn(fptr, felem, nelem, &status);
	sv_setiv(ST(3), (IV)status);
	SvSETMAGIC(ST(3));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffprec); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffprec)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, card, status");
    {
	fitsfile *	fptr;
	char *	card;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	{
		if (ST(1) == &PL_sv_undef)
			card = (char *)NULL;
		else
			card = (char *)SvPV(ST(1),PL_na);
	}
;

	RETVAL = ffprec(fptr, card, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpss); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpss)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, dtype, fpix, lpix, nelem, array, status");
    {
	fitsfile *	fptr;
	int	dtype = (int)SvIV(ST(1))
;
	long *	fpix = (long *)packND(ST(2),TLONG)
;
	long *	lpix = (long *)packND(ST(3),TLONG)
;
	SV *	array = ST(5)
;
	int	status = (int)SvIV(ST(6))
;
#line 12009 "CFITSIO.xs"
		int storage_dtype;
#line 26094 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 12011 "CFITSIO.xs"
		storage_dtype = dtype;
		if (dtype == TBIT)
			storage_dtype = TLOGICAL;
		RETVAL = ffpss(fptr,dtype,fpix,lpix,packND(array,storage_dtype),&status);
#line 26109 "CFITSIO.c"
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixel, lpixel, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	naxis = (long)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixel = (long *)packND(ST(4),TLONG)
;
	long *	lpixel = (long *)packND(ST(5),TLONG)
;
	byte *	array = (byte *)packND(ST(6),TBYTE)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpssb(fptr, group, naxis, naxes, fpixel, lpixel, array, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpsssb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpsssb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixel, lpixel, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	naxis = (long)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixel = (long *)packND(ST(4),TLONG)
;
	long *	lpixel = (long *)packND(ST(5),TLONG)
;
	signed char*	array = (signed char *)packND(ST(6),TSBYTE)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpsssb(fptr, group, naxis, naxes, fpixel, lpixel, array, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssui); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssui)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixel, lpixel, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	naxis = (long)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixel = (long *)packND(ST(4),TLONG)
;
	long *	lpixel = (long *)packND(ST(5),TLONG)
;
	unsigned short *	array = (unsigned short *)packND(ST(6),TUSHORT)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpssui(fptr, group, naxis, naxes, fpixel, lpixel, array, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssi); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssi)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixel, lpixel, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	naxis = (long)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixel = (long *)packND(ST(4),TLONG)
;
	long *	lpixel = (long *)packND(ST(5),TLONG)
;
	short *	array = (short *)packND(ST(6),TSHORT)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpssi(fptr, group, naxis, naxes, fpixel, lpixel, array, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssuk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssuk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixel, lpixel, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	naxis = (long)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixel = (long *)packND(ST(4),TLONG)
;
	long *	lpixel = (long *)packND(ST(5),TLONG)
;
	unsigned int *	array = (unsigned int *)packND(ST(6),TUINT)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpssuk(fptr, group, naxis, naxes, fpixel, lpixel, array, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssk); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssk)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixel, lpixel, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	naxis = (long)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixel = (long *)packND(ST(4),TLONG)
;
	long *	lpixel = (long *)packND(ST(5),TLONG)
;
	int *	array = (int *)packND(ST(6),TINT)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpssk(fptr, group, naxis, naxes, fpixel, lpixel, array, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssuj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssuj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixel, lpixel, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	naxis = (long)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixel = (long *)packND(ST(4),TLONG)
;
	long *	lpixel = (long *)packND(ST(5),TLONG)
;
	unsigned long *	array = (unsigned long *)packND(ST(6),TULONG)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpssuj(fptr, group, naxis, naxes, fpixel, lpixel, array, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixel, lpixel, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	naxis = (long)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixel = (long *)packND(ST(4),TLONG)
;
	long *	lpixel = (long *)packND(ST(5),TLONG)
;
	long *	array = (long *)packND(ST(6),TLONG)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpssj(fptr, group, naxis, naxes, fpixel, lpixel, array, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssjj); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssjj)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixel, lpixel, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	naxis = (long)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixel = (long *)packND(ST(4),TLONG)
;
	long *	lpixel = (long *)packND(ST(5),TLONG)
;
	LONGLONG*	array = (LONGLONG *)packND(ST(6),TLONGLONG)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpssjj(fptr, group, naxis, naxes, fpixel, lpixel, array, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpsse); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpsse)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixel, lpixel, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	naxis = (long)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixel = (long *)packND(ST(4),TLONG)
;
	long *	lpixel = (long *)packND(ST(5),TLONG)
;
	float *	array = (float *)packND(ST(6),TFLOAT)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpsse(fptr, group, naxis, naxes, fpixel, lpixel, array, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpssd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, group, naxis, naxes, fpixel, lpixel, array, status");
    {
	fitsfile *	fptr;
	long	group = (long)SvIV(ST(1))
;
	long	naxis = (long)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	long *	fpixel = (long *)packND(ST(4),TLONG)
;
	long *	lpixel = (long *)packND(ST(5),TLONG)
;
	double *	array = (double *)packND(ST(6),TDOUBLE)
;
	int	status = (int)SvIV(ST(7))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpssd(fptr, group, naxis, naxes, fpixel, lpixel, array, &status);
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffptbb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffptbb)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, frow, fchar, nchars, values, status");
    {
	fitsfile *	fptr;
	LONGLONG	frow = (LONGLONG)SvIV(ST(1))
;
	LONGLONG	fchar = (LONGLONG)SvIV(ST(2))
;
	LONGLONG	nchars = (LONGLONG)SvIV(ST(3))
;
	byte *	values = (byte *)packND(ST(4),TBYTE)
;
	int	status = (int)SvIV(ST(5))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffptbb(fptr, frow, fchar, nchars, values, &status);
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffptdm); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffptdm)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, colnum, naxis, naxes, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	long *	naxes = (long *)packND(ST(3),TLONG)
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffptdm(fptr, colnum, naxis, naxes, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffptdmll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffptdmll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, colnum, naxis, naxes, status");
    {
	fitsfile *	fptr;
	int	colnum = (int)SvIV(ST(1))
;
	int	naxis = (int)SvIV(ST(2))
;
	LONGLONG *	naxes = (LONGLONG *)packND(ST(3),TLONGLONG)
;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffptdmll(fptr, colnum, naxis, naxes, &status);
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpthp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffpthp)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, theap, status");
    {
	fitsfile *	fptr;
	long	theap = (long)SvIV(ST(1))
;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;

	RETVAL = ffpthp(fptr, theap, &status);
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgiwcs); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgiwcs)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "fptr, header, status");
    {
	fitsfile *	fptr;
	char *	header;
	int	status = (int)SvIV(ST(2))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 12256 "CFITSIO.xs"
		RETVAL = ffgiwcs(fptr,&header,&status);
		if (status == 0) {
			if (ST(1) != &PL_sv_undef)
				unpackScalar(ST(1),header,TSTRING);
			free(header);
		}
#line 26766 "CFITSIO.c"
	sv_setiv(ST(2), (IV)status);
	SvSETMAGIC(ST(2));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtwcs); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgtwcs)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, xcol, ycol, header, status");
    {
	fitsfile *	fptr;
	int	xcol = (int)SvIV(ST(1))
;
	int	ycol = (int)SvIV(ST(2))
;
	char *	header;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 12277 "CFITSIO.xs"
		RETVAL = ffgtwcs(fptr,xcol,ycol,&header,&status);
		if (status == 0) {
			if (ST(3)!=&PL_sv_undef)
				unpackScalar(ST(3),header,TSTRING);
			free(header);
		}
#line 26808 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgipr); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgipr)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, bitbix, naxis, naxes, status");
    {
	FitsFile *	fptr;
	int	bitpix;
	int	naxis;
	long *	naxes;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 12298 "CFITSIO.xs"
		if (ST(3)!=&PL_sv_undef) {
			RETVAL = ffgipr(fptr->fptr,0,&bitpix,&naxis,NULL,&status);
			naxes = get_mortalspace(naxis,TLONG);
		}
		else {
			naxis = 0;
			naxes = NULL;
		}
		RETVAL = ffgipr(fptr->fptr,naxis,&bitpix,&naxis,naxes,&status);
		if (ST(1)!=&PL_sv_undef) sv_setiv(ST(1),bitpix);
		if (ST(2)!=&PL_sv_undef) sv_setiv(ST(2),naxis);
		if (ST(3)!=&PL_sv_undef) unpack1D(ST(3),naxes,naxis,TLONG,fptr->perlyunpacking);
#line 26854 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgiprll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgiprll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 5)
       croak_xs_usage(cv,  "fptr, bitbix, naxis, naxes, status");
    {
	FitsFile *	fptr;
	int	bitpix;
	int	naxis;
	LONGLONG *	naxes;
	int	status = (int)SvIV(ST(4))
;
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 12325 "CFITSIO.xs"
		if (ST(3)!=&PL_sv_undef) {
			RETVAL = ffgiprll(fptr->fptr,0,&bitpix,&naxis,NULL,&status);
			naxes = get_mortalspace(naxis,TLONGLONG);
		}
		else {
			naxis = 0;
			naxes = NULL;
		}
		RETVAL = ffgiprll(fptr->fptr,naxis,&bitpix,&naxis,naxes,&status);
		if (ST(1)!=&PL_sv_undef) sv_setiv(ST(1),bitpix);
		if (ST(2)!=&PL_sv_undef) sv_setiv(ST(2),naxis);
		if (ST(3)!=&PL_sv_undef) unpack1D(ST(3),naxes,naxis,TLONGLONG,fptr->perlyunpacking);
#line 26900 "CFITSIO.c"
	sv_setiv(ST(4), (IV)status);
	SvSETMAGIC(ST(4));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkcl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgkcl)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "card");
    {
	char *	card;
	int	RETVAL;
	dXSTARG;

	{
		if (ST(0) == &PL_sv_undef)
			card = (char *)NULL;
		else
			card = (char *)SvPV(ST(0),PL_na);
	}
;

	RETVAL = ffgkcl(card);
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpxv); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpxv)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, dtype, fpix, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	dtype = (int)SvIV(ST(1))
;
	long *	fpix = (long *)packND(ST(2),TLONG)
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	SV *	nulval = ST(4)
;
	void *	array;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
#line 12361 "CFITSIO.xs"
		int naxis;
		long *naxes;
		OFF_T nelem_all;
		int i;
#line 26964 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 12366 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nelem*sizeof_datatype(dtype));
			RETVAL = ffgpxv(fptr->fptr, dtype, fpix, nelem, (nulval!=&PL_sv_undef ? pack1D(nulval, dtype) : NULL), (void*)SvPV(ST(5),PL_na), &anynul, &status);
		}
		else {
			/* find out how many elements are in the image,
			 * allocate space, read, unpack
			 */
			RETVAL = ffgidm(fptr->fptr, &naxis, &status);
			if (status == 0) {
				naxes = get_mortalspace(naxis, TLONG);
				RETVAL = ffgisz(fptr->fptr, naxis, naxes, &status);
				nelem_all = 1;
				for (i=0; i<naxis; i++)
					nelem_all *= naxes[i];
				array=get_mortalspace(nelem_all,dtype);
				RETVAL=ffgpxv(fptr->fptr, dtype, fpix, nelem, (nulval!=&PL_sv_undef ?  pack1D(nulval, dtype) : NULL), array, &anynul, &status);
				if (status == 0) {
					order_reverse(naxis, naxes);
					unpackND(ST(5), array, naxis, naxes, dtype, fptr->perlyunpacking);
				}
			}
		}
		if (ST(6) != &PL_sv_undef)
			sv_setiv(ST(6), anynul);
#line 27000 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpxvll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpxvll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, dtype, fpix, nelem, nulval, array, anynul, status");
    {
	FitsFile *	fptr;
	int	dtype = (int)SvIV(ST(1))
;
	LONGLONG *	fpix = (LONGLONG *)packND(ST(2),TLONGLONG)
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	SV *	nulval = ST(4)
;
	void *	array;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
#line 12409 "CFITSIO.xs"
		int naxis;
		LONGLONG *naxes;
		OFF_T nelem_all;
		int i;
#line 27036 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 12414 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			SvGROW(ST(5),nelem*sizeof_datatype(dtype));
			RETVAL = ffgpxvll(fptr->fptr, dtype, fpix, nelem, (nulval!=&PL_sv_undef ? pack1D(nulval, dtype) : NULL), (void*)SvPV(ST(5),PL_na), &anynul, &status);
		}
		else {
			/* find out how many elements are in the image,
			 * allocate space, read, unpack
			 */
			RETVAL = ffgidm(fptr->fptr, &naxis, &status);
			if (status == 0) {
				naxes = get_mortalspace(naxis, TLONGLONG);
				RETVAL = ffgiszll(fptr->fptr, naxis, naxes, &status);
				nelem_all = 1;
				for (i=0; i<naxis; i++)
					nelem_all *= naxes[i];
				array=get_mortalspace(nelem_all,dtype);
				RETVAL=ffgpxvll(fptr->fptr, dtype, fpix, nelem, (nulval!=&PL_sv_undef ?  pack1D(nulval, dtype) : NULL), array, &anynul, &status);
				if (status == 0) {
					order_reversell(naxis, naxes);
					unpackNDll(ST(5), array, naxis, naxes, dtype,fptr->perlyunpacking);
				}
			}
		}
		if (ST(6) != &PL_sv_undef)
			sv_setiv(ST(6), anynul);
#line 27072 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpxf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpxf)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, dtype, fpix, nelem, array, nullarray, anynul, status");
    {
	FitsFile *	fptr;
	int	dtype = (int)SvIV(ST(1))
;
	long *	fpix = (long *)packND(ST(2),TLONG)
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	void *	array;
	logical *	nullarray;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
#line 12457 "CFITSIO.xs"
		int naxis;
		long *naxes;
		OFF_T nelem_all;
		int i;
#line 27107 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 12462 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nelem*sizeof_datatype(dtype));
				array = (void*)SvPV(ST(4),PL_na);
			}
			else
				array = get_mortalspace(nelem, dtype);
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				nullarray = (logical*)SvPV(ST(5),PL_na);
			}
			else
				nullarray = get_mortalspace(nelem,TLOGICAL);
			RETVAL = ffgpxf(fptr->fptr,dtype,fpix,nelem,array,nullarray, &anynul,&status);
		}
		else {
			/* find out how many elements are in the image,
			 * allocate space, read, unpack
			 */
			RETVAL = ffgidm(fptr->fptr, &naxis, &status);
			if (status == 0) {
				naxes = get_mortalspace(naxis, TLONG);
				RETVAL = ffgisz(fptr->fptr, naxis, naxes, &status);
				nelem_all = 1;
				for (i=0; i<naxis; i++)
					nelem_all *= naxes[i];
				array=get_mortalspace(nelem_all,dtype);
				nullarray=get_mortalspace(nelem_all,TLOGICAL);
				RETVAL=ffgpxf(fptr->fptr,dtype,fpix,nelem,array,nullarray,&anynul,&status);
				if (status == 0) {
					order_reverse(naxis, naxes);
					if (ST(4)!=&PL_sv_undef)
						unpackND(ST(4),array,naxis,naxes,dtype,fptr->perlyunpacking);
					if (ST(5)!=&PL_sv_undef)
						unpackND(ST(5),nullarray,naxis,naxes,TLOGICAL,fptr->perlyunpacking);
				}
			}
		}
		if (ST(6) != &PL_sv_undef)
			sv_setiv(ST(6), anynul);
#line 27158 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpxfll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffgpxfll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 8)
       croak_xs_usage(cv,  "fptr, dtype, fpix, nelem, array, nullarray, anynul, status");
    {
	FitsFile *	fptr;
	int	dtype = (int)SvIV(ST(1))
;
	LONGLONG *	fpix = (LONGLONG *)packND(ST(2),TLONGLONG)
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	void *	array;
	logical *	nullarray;
	int	anynul;
	int	status = (int)SvIV(ST(7))
;
#line 12520 "CFITSIO.xs"
		int naxis;
		LONGLONG *naxes;
		OFF_T nelem_all;
		int i;
#line 27193 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
            fptr = FitsFileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 12525 "CFITSIO.xs"
		if (!PERLYUNPACKING(fptr->perlyunpacking)) {
			if (ST(4) != &PL_sv_undef) {
				SvGROW(ST(4),nelem*sizeof_datatype(dtype));
				array = (void*)SvPV(ST(4),PL_na);
			}
			else
				array = get_mortalspace(nelem, dtype);
			if (ST(5) != &PL_sv_undef) {
				SvGROW(ST(5),nelem*sizeof_datatype(TLOGICAL));
				nullarray = (logical*)SvPV(ST(5),PL_na);
			}
			else
				nullarray = get_mortalspace(nelem,TLOGICAL);
			RETVAL = ffgpxfll(fptr->fptr,dtype,fpix,nelem,array,nullarray, &anynul,&status);
		}
		else {
			/* find out how many elements are in the image,
			 * allocate space, read, unpack
			 */
			RETVAL = ffgidm(fptr->fptr, &naxis, &status);
			if (status == 0) {
				naxes = get_mortalspace(naxis, TLONGLONG);
				RETVAL = ffgiszll(fptr->fptr, naxis, naxes, &status);
				nelem_all = 1;
				for (i=0; i<naxis; i++)
					nelem_all *= naxes[i];
				array=get_mortalspace(nelem_all,dtype);
				nullarray=get_mortalspace(nelem_all,TLOGICAL);
				RETVAL=ffgpxfll(fptr->fptr,dtype,fpix,nelem,array,nullarray,&anynul,&status);
				if (status == 0) {
					order_reversell(naxis, naxes);
					if (ST(4)!=&PL_sv_undef)
						unpackNDll(ST(4),array,naxis,naxes,dtype,fptr->perlyunpacking);
					if (ST(5)!=&PL_sv_undef)
						unpackNDll(ST(5),nullarray,naxis,naxes,TLOGICAL,fptr->perlyunpacking);
				}
			}
		}
		if (ST(6) != &PL_sv_undef)
			sv_setiv(ST(6), anynul);
#line 27244 "CFITSIO.c"
	sv_setiv(ST(7), (IV)status);
	SvSETMAGIC(ST(7));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppx); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppx)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, dtype, fpix, nelem, array, status");
    {
	fitsfile *	fptr;
	int	dtype = (int)SvIV(ST(1))
;
	long *	fpix = (long *)packND(ST(2),TLONG)
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	SV *	array = ST(4)
;
	int	status = (int)SvIV(ST(5))
;
#line 12581 "CFITSIO.xs"
		int storage_dtype;
#line 27275 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 12583 "CFITSIO.xs"
		storage_dtype = dtype;
		if (dtype == TBIT)
			storage_dtype = TLOGICAL;
		RETVAL = ffppx(fptr,dtype,fpix,nelem,packND(array,storage_dtype),&status);
#line 27290 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppxll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppxll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 6)
       croak_xs_usage(cv,  "fptr, dtype, fpix, nelem, array, status");
    {
	fitsfile *	fptr;
	int	dtype = (int)SvIV(ST(1))
;
	LONGLONG *	fpix = (LONGLONG *)packND(ST(2),TLONGLONG)
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	SV *	array = ST(4)
;
	int	status = (int)SvIV(ST(5))
;
#line 12603 "CFITSIO.xs"
		int storage_dtype;
#line 27321 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 12605 "CFITSIO.xs"
		storage_dtype = dtype;
		if (dtype == TBIT)
			storage_dtype = TLOGICAL;
		RETVAL = ffppxll(fptr,dtype,fpix,nelem,packND(array,storage_dtype),&status);
#line 27336 "CFITSIO.c"
	sv_setiv(ST(5), (IV)status);
	SvSETMAGIC(ST(5));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppxn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppxn)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, dtype, fpix, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	dtype = (int)SvIV(ST(1))
;
	long *	fpix = (long *)packND(ST(2),TLONG)
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	SV *	array = ST(4)
;
	SV *	nulval = ST(5)
;
	int	status = (int)SvIV(ST(6))
;
#line 12626 "CFITSIO.xs"
		int storage_dtype;
#line 27369 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 12628 "CFITSIO.xs"
		storage_dtype = dtype;
		if (dtype == TBIT)
			storage_dtype = TLOGICAL;
		RETVAL = ffppxn(fptr,dtype,fpix,nelem,packND(array,storage_dtype),(nulval!=&PL_sv_undef ? pack1D(nulval,storage_dtype) : NULL), &status);
#line 27384 "CFITSIO.c"
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppxnll); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Astro__FITS__CFITSIO_ffppxnll)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 7)
       croak_xs_usage(cv,  "fptr, dtype, fpix, nelem, array, nulval, status");
    {
	fitsfile *	fptr;
	int	dtype = (int)SvIV(ST(1))
;
	LONGLONG *	fpix = (LONGLONG *)packND(ST(2),TLONGLONG)
;
	LONGLONG	nelem = (LONGLONG)SvIV(ST(3))
;
	SV *	array = ST(4)
;
	SV *	nulval = ST(5)
;
	int	status = (int)SvIV(ST(6))
;
#line 12649 "CFITSIO.xs"
		int storage_dtype;
#line 27417 "CFITSIO.c"
	int	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "fitsfilePtr")) {
	    fptr = fitsfileSV(ST(0));
        }
        else
            croak("fptr is not of type fitsfilePtr")
;
#line 12651 "CFITSIO.xs"
		storage_dtype = dtype;
		if (dtype == TBIT)
			storage_dtype = TLOGICAL;
		RETVAL = ffppxnll(fptr,dtype,fpix,nelem,packND(array,storage_dtype),(nulval!=&PL_sv_undef ? pack1D(nulval,storage_dtype) : NULL), &status);
#line 27432 "CFITSIO.c"
	sv_setiv(ST(6), (IV)status);
	SvSETMAGIC(ST(6));
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Astro__FITS__CFITSIO); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Astro__FITS__CFITSIO)
{
#if PERL_VERSION_LE(5, 21, 5)
    dVAR; dXSARGS;
#else
    dVAR; dXSBOOTARGSXSAPIVERCHK;
#endif
#if PERL_VERSION_LE(5, 8, 999) /* PERL_VERSION_LT is 5.33+ */
    char* file = __FILE__;
#else
    const char* file = __FILE__;
#endif

    PERL_UNUSED_VAR(file);

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
#if PERL_VERSION_LE(5, 21, 5)
    XS_VERSION_BOOTCHECK;
#  ifdef XS_APIVERSION_BOOTCHECK
    XS_APIVERSION_BOOTCHECK;
#  endif
#endif

    {
        CV * cv;

        newXS_deffile("Astro::FITS::CFITSIO::constant", XS_Astro__FITS__CFITSIO_constant);
        newXS_deffile("Astro::FITS::CFITSIO::sizeof_datatype", XS_Astro__FITS__CFITSIO_sizeof_datatype);
        newXS_deffile("Astro::FITS::CFITSIO::PerlyUnpacking", XS_Astro__FITS__CFITSIO_PerlyUnpacking);
        cv = newXS_deffile("Astro::FITS::CFITSIO::perlyunpacking", XS_Astro__FITS__CFITSIO_perlyunpacking);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("fitsfilePtr::perlyunpacking", XS_Astro__FITS__CFITSIO_perlyunpacking);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::_is_open", XS_Astro__FITS__CFITSIO__is_open);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("fitsfilePtr::_is_open", XS_Astro__FITS__CFITSIO__is_open);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::PERLYUNPACKING", XS_Astro__FITS__CFITSIO_PERLYUNPACKING);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("fitsfilePtr::PERLYUNPACKING", XS_Astro__FITS__CFITSIO_PERLYUNPACKING);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::DESTROY", XS_Astro__FITS__CFITSIO_DESTROY);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("fitsfilePtr::DESTROY", XS_Astro__FITS__CFITSIO_DESTROY);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtam", XS_Astro__FITS__CFITSIO_ffgtam);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_add_group_member", XS_Astro__FITS__CFITSIO_ffgtam);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::add_group_member", XS_Astro__FITS__CFITSIO_ffgtam);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffasfm", XS_Astro__FITS__CFITSIO_ffasfm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_ascii_tform", XS_Astro__FITS__CFITSIO_ffasfm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffbnfm", XS_Astro__FITS__CFITSIO_ffbnfm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_binary_tform", XS_Astro__FITS__CFITSIO_ffbnfm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffbnfmll", XS_Astro__FITS__CFITSIO_ffbnfmll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_binary_tformll", XS_Astro__FITS__CFITSIO_ffbnfmll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcrow", XS_Astro__FITS__CFITSIO_ffcrow);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_calc_rows", XS_Astro__FITS__CFITSIO_ffcrow);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::calc_rows", XS_Astro__FITS__CFITSIO_ffcrow);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcalc", XS_Astro__FITS__CFITSIO_ffcalc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_calculator", XS_Astro__FITS__CFITSIO_ffcalc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::calculator", XS_Astro__FITS__CFITSIO_ffcalc);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcalc_rng", XS_Astro__FITS__CFITSIO_ffcalc_rng);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_calculator_rng", XS_Astro__FITS__CFITSIO_ffcalc_rng);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::calculator_rng", XS_Astro__FITS__CFITSIO_ffcalc_rng);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtch", XS_Astro__FITS__CFITSIO_ffgtch);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_change_group", XS_Astro__FITS__CFITSIO_ffgtch);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::change_group", XS_Astro__FITS__CFITSIO_ffgtch);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpmrk", XS_Astro__FITS__CFITSIO_ffpmrk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_errmark", XS_Astro__FITS__CFITSIO_ffpmrk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcmrk", XS_Astro__FITS__CFITSIO_ffcmrk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_clear_errmark", XS_Astro__FITS__CFITSIO_ffcmrk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcmsg", XS_Astro__FITS__CFITSIO_ffcmsg);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_clear_errmsg", XS_Astro__FITS__CFITSIO_ffcmsg);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffclos", XS_Astro__FITS__CFITSIO_ffclos);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_close_file", XS_Astro__FITS__CFITSIO_ffclos);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::close_file", XS_Astro__FITS__CFITSIO_ffclos);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtcm", XS_Astro__FITS__CFITSIO_ffgtcm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_compact_group", XS_Astro__FITS__CFITSIO_ffgtcm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::compact_group", XS_Astro__FITS__CFITSIO_ffgtcm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcmps", XS_Astro__FITS__CFITSIO_ffcmps);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_compare_str", XS_Astro__FITS__CFITSIO_ffcmps);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcmph", XS_Astro__FITS__CFITSIO_ffcmph);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_compress_heap", XS_Astro__FITS__CFITSIO_ffcmph);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::compress_heap", XS_Astro__FITS__CFITSIO_ffcmph);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcpcl", XS_Astro__FITS__CFITSIO_ffcpcl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_copy_col", XS_Astro__FITS__CFITSIO_ffcpcl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::copy_col", XS_Astro__FITS__CFITSIO_ffcpcl);
        XSANY.any_i32 = 2;
#if XSubPPtmpAAAA
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffccls", XS_Astro__FITS__CFITSIO_ffccls);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_copy_cols", XS_Astro__FITS__CFITSIO_ffccls);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::copy_cols", XS_Astro__FITS__CFITSIO_ffccls);
        XSANY.any_i32 = 2;
#endif
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcprw", XS_Astro__FITS__CFITSIO_ffcprw);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_copy_rows", XS_Astro__FITS__CFITSIO_ffcprw);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::copy_rows", XS_Astro__FITS__CFITSIO_ffcprw);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcpsr", XS_Astro__FITS__CFITSIO_ffcpsr);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_copy_select_rows", XS_Astro__FITS__CFITSIO_ffcpsr);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::copy_select_rows", XS_Astro__FITS__CFITSIO_ffcpsr);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcpdt", XS_Astro__FITS__CFITSIO_ffcpdt);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_copy_data", XS_Astro__FITS__CFITSIO_ffcpdt);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::copy_data", XS_Astro__FITS__CFITSIO_ffcpdt);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffwrhdu", XS_Astro__FITS__CFITSIO_ffwrhdu);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_hdu", XS_Astro__FITS__CFITSIO_ffwrhdu);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_hdu", XS_Astro__FITS__CFITSIO_ffwrhdu);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtcp", XS_Astro__FITS__CFITSIO_ffgtcp);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_copy_group", XS_Astro__FITS__CFITSIO_ffgtcp);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::copy_group", XS_Astro__FITS__CFITSIO_ffgtcp);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcpfl", XS_Astro__FITS__CFITSIO_ffcpfl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_copy_file", XS_Astro__FITS__CFITSIO_ffcpfl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::copy_file", XS_Astro__FITS__CFITSIO_ffcpfl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcopy", XS_Astro__FITS__CFITSIO_ffcopy);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_copy_hdu", XS_Astro__FITS__CFITSIO_ffcopy);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::copy_hdu", XS_Astro__FITS__CFITSIO_ffcopy);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcphd", XS_Astro__FITS__CFITSIO_ffcphd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_copy_header", XS_Astro__FITS__CFITSIO_ffcphd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::copy_header", XS_Astro__FITS__CFITSIO_ffcphd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcpky", XS_Astro__FITS__CFITSIO_ffcpky);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_copy_key", XS_Astro__FITS__CFITSIO_ffcpky);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::copy_key", XS_Astro__FITS__CFITSIO_ffcpky);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgmcp", XS_Astro__FITS__CFITSIO_ffgmcp);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_copy_member", XS_Astro__FITS__CFITSIO_ffgmcp);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::copy_member", XS_Astro__FITS__CFITSIO_ffgmcp);
        XSANY.any_i32 = 2;
        newXS_deffile("Astro::FITS::CFITSIO::create_file", XS_Astro__FITS__CFITSIO_create_file);
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffinit", XS_Astro__FITS__CFITSIO_ffinit);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_create_file", XS_Astro__FITS__CFITSIO_ffinit);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdkinit", XS_Astro__FITS__CFITSIO_ffdkinit);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_create_diskfile", XS_Astro__FITS__CFITSIO_ffdkinit);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtcr", XS_Astro__FITS__CFITSIO_ffgtcr);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_create_group", XS_Astro__FITS__CFITSIO_ffgtcr);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::create_group", XS_Astro__FITS__CFITSIO_ffgtcr);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcrhd", XS_Astro__FITS__CFITSIO_ffcrhd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_create_hdu", XS_Astro__FITS__CFITSIO_ffcrhd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::create_hdu", XS_Astro__FITS__CFITSIO_ffcrhd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcrim", XS_Astro__FITS__CFITSIO_ffcrim);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_create_img", XS_Astro__FITS__CFITSIO_ffcrim);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::create_img", XS_Astro__FITS__CFITSIO_ffcrim);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcrimll", XS_Astro__FITS__CFITSIO_ffcrimll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_create_imgll", XS_Astro__FITS__CFITSIO_ffcrimll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::create_imgll", XS_Astro__FITS__CFITSIO_ffcrimll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcrtb", XS_Astro__FITS__CFITSIO_ffcrtb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_create_tbl", XS_Astro__FITS__CFITSIO_ffcrtb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::create_tbl", XS_Astro__FITS__CFITSIO_ffcrtb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcpht", XS_Astro__FITS__CFITSIO_ffcpht);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_copy_hdutab", XS_Astro__FITS__CFITSIO_ffcpht);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::copy_hdutab", XS_Astro__FITS__CFITSIO_ffcpht);
        XSANY.any_i32 = 2;
        newXS_deffile("Astro::FITS::CFITSIO::create_template", XS_Astro__FITS__CFITSIO_create_template);
        cv = newXS_deffile("Astro::FITS::CFITSIO::fftplt", XS_Astro__FITS__CFITSIO_fftplt);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_create_template", XS_Astro__FITS__CFITSIO_fftplt);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdt2s", XS_Astro__FITS__CFITSIO_ffdt2s);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_date2str", XS_Astro__FITS__CFITSIO_ffdt2s);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdsum", XS_Astro__FITS__CFITSIO_ffdsum);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_decode_chksum", XS_Astro__FITS__CFITSIO_ffdsum);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdtdm", XS_Astro__FITS__CFITSIO_ffdtdm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_decode_tdim", XS_Astro__FITS__CFITSIO_ffdtdm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::decode_tdim", XS_Astro__FITS__CFITSIO_ffdtdm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdtdmll", XS_Astro__FITS__CFITSIO_ffdtdmll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_decode_tdimll", XS_Astro__FITS__CFITSIO_ffdtdmll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::decode_tdimll", XS_Astro__FITS__CFITSIO_ffdtdmll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_decomp_img", XS_Astro__FITS__CFITSIO_fits_decomp_img);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_decompress_img", XS_Astro__FITS__CFITSIO_fits_decomp_img);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::decompress_img", XS_Astro__FITS__CFITSIO_fits_decomp_img);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdcol", XS_Astro__FITS__CFITSIO_ffdcol);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_delete_col", XS_Astro__FITS__CFITSIO_ffdcol);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::delete_col", XS_Astro__FITS__CFITSIO_ffdcol);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdelt", XS_Astro__FITS__CFITSIO_ffdelt);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_delete_file", XS_Astro__FITS__CFITSIO_ffdelt);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::delete_file", XS_Astro__FITS__CFITSIO_ffdelt);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdhdu", XS_Astro__FITS__CFITSIO_ffdhdu);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_delete_hdu", XS_Astro__FITS__CFITSIO_ffdhdu);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::delete_hdu", XS_Astro__FITS__CFITSIO_ffdhdu);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdkey", XS_Astro__FITS__CFITSIO_ffdkey);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_delete_key", XS_Astro__FITS__CFITSIO_ffdkey);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::delete_key", XS_Astro__FITS__CFITSIO_ffdkey);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdrec", XS_Astro__FITS__CFITSIO_ffdrec);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_delete_record", XS_Astro__FITS__CFITSIO_ffdrec);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::delete_record", XS_Astro__FITS__CFITSIO_ffdrec);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdrrg", XS_Astro__FITS__CFITSIO_ffdrrg);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_delete_rowrange", XS_Astro__FITS__CFITSIO_ffdrrg);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::delete_rowrange", XS_Astro__FITS__CFITSIO_ffdrrg);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdrws", XS_Astro__FITS__CFITSIO_ffdrws);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_delete_rowlist", XS_Astro__FITS__CFITSIO_ffdrws);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::delete_rowlist", XS_Astro__FITS__CFITSIO_ffdrws);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdrwsll", XS_Astro__FITS__CFITSIO_ffdrwsll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_delete_rowlistll", XS_Astro__FITS__CFITSIO_ffdrwsll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::delete_rowlistll", XS_Astro__FITS__CFITSIO_ffdrwsll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdrow", XS_Astro__FITS__CFITSIO_ffdrow);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_delete_rows", XS_Astro__FITS__CFITSIO_ffdrow);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::delete_rows", XS_Astro__FITS__CFITSIO_ffdrow);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffesum", XS_Astro__FITS__CFITSIO_ffesum);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_encode_chksum", XS_Astro__FITS__CFITSIO_ffesum);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffexist", XS_Astro__FITS__CFITSIO_ffexist);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_file_exists", XS_Astro__FITS__CFITSIO_ffexist);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffflmd", XS_Astro__FITS__CFITSIO_ffflmd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_file_mode", XS_Astro__FITS__CFITSIO_ffflmd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::file_mode", XS_Astro__FITS__CFITSIO_ffflmd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffflnm", XS_Astro__FITS__CFITSIO_ffflnm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_file_name", XS_Astro__FITS__CFITSIO_ffflnm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::file_name", XS_Astro__FITS__CFITSIO_ffflnm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgnxk", XS_Astro__FITS__CFITSIO_ffgnxk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_find_nextkey", XS_Astro__FITS__CFITSIO_ffgnxk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::find_nextkey", XS_Astro__FITS__CFITSIO_ffgnxk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffffrw", XS_Astro__FITS__CFITSIO_ffffrw);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_find_first_row", XS_Astro__FITS__CFITSIO_ffffrw);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::find_first_row", XS_Astro__FITS__CFITSIO_ffffrw);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fffrow", XS_Astro__FITS__CFITSIO_fffrow);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_find_rows", XS_Astro__FITS__CFITSIO_fffrow);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::find_rows", XS_Astro__FITS__CFITSIO_fffrow);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffflus", XS_Astro__FITS__CFITSIO_ffflus);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_flush_file", XS_Astro__FITS__CFITSIO_ffflus);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::flush_file", XS_Astro__FITS__CFITSIO_ffflus);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffihtps", XS_Astro__FITS__CFITSIO_ffihtps);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_init_https", XS_Astro__FITS__CFITSIO_ffihtps);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffchtps", XS_Astro__FITS__CFITSIO_ffchtps);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_cleanup_https", XS_Astro__FITS__CFITSIO_ffchtps);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffvhtps", XS_Astro__FITS__CFITSIO_ffvhtps);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_verbose_https", XS_Astro__FITS__CFITSIO_ffvhtps);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffshdwn", XS_Astro__FITS__CFITSIO_ffshdwn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_show_download_progress", XS_Astro__FITS__CFITSIO_ffshdwn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtmo", XS_Astro__FITS__CFITSIO_ffgtmo);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_timeout", XS_Astro__FITS__CFITSIO_ffgtmo);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffstmo", XS_Astro__FITS__CFITSIO_ffstmo);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_set_timeout", XS_Astro__FITS__CFITSIO_ffstmo);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffflsh", XS_Astro__FITS__CFITSIO_ffflsh);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_flush_buffer", XS_Astro__FITS__CFITSIO_ffflsh);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::flush_buffer", XS_Astro__FITS__CFITSIO_ffflsh);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgacl", XS_Astro__FITS__CFITSIO_ffgacl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_acolparms", XS_Astro__FITS__CFITSIO_ffgacl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_acolparms", XS_Astro__FITS__CFITSIO_ffgacl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgbcl", XS_Astro__FITS__CFITSIO_ffgbcl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_bcolparms", XS_Astro__FITS__CFITSIO_ffgbcl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_bcolparms", XS_Astro__FITS__CFITSIO_ffgbcl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgbclll", XS_Astro__FITS__CFITSIO_ffgbclll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_bcolparmsll", XS_Astro__FITS__CFITSIO_ffgbclll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_bcolparmsll", XS_Astro__FITS__CFITSIO_ffgbclll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcks", XS_Astro__FITS__CFITSIO_ffgcks);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_chksum", XS_Astro__FITS__CFITSIO_ffgcks);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_chksum", XS_Astro__FITS__CFITSIO_ffgcks);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcnn", XS_Astro__FITS__CFITSIO_ffgcnn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_colname", XS_Astro__FITS__CFITSIO_ffgcnn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_colname", XS_Astro__FITS__CFITSIO_ffgcnn);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcno", XS_Astro__FITS__CFITSIO_ffgcno);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_colnum", XS_Astro__FITS__CFITSIO_ffgcno);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_colnum", XS_Astro__FITS__CFITSIO_ffgcno);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtcl", XS_Astro__FITS__CFITSIO_ffgtcl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_coltype", XS_Astro__FITS__CFITSIO_ffgtcl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_coltype", XS_Astro__FITS__CFITSIO_ffgtcl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtclll", XS_Astro__FITS__CFITSIO_ffgtclll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_coltypell", XS_Astro__FITS__CFITSIO_ffgtclll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_coltypell", XS_Astro__FITS__CFITSIO_ffgtclll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffeqty", XS_Astro__FITS__CFITSIO_ffeqty);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_eqcoltype", XS_Astro__FITS__CFITSIO_ffeqty);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_eqcoltype", XS_Astro__FITS__CFITSIO_ffeqty);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffeqtyll", XS_Astro__FITS__CFITSIO_ffeqtyll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_eqcoltypell", XS_Astro__FITS__CFITSIO_ffeqtyll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_eqcoltypell", XS_Astro__FITS__CFITSIO_ffeqtyll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_compression_type", XS_Astro__FITS__CFITSIO_fits_get_compression_type);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("fitsfilePtr::get_compression_type", XS_Astro__FITS__CFITSIO_fits_get_compression_type);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgerr", XS_Astro__FITS__CFITSIO_ffgerr);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_errstatus", XS_Astro__FITS__CFITSIO_ffgerr);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffghps", XS_Astro__FITS__CFITSIO_ffghps);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_hdrpos", XS_Astro__FITS__CFITSIO_ffghps);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_hdrpos", XS_Astro__FITS__CFITSIO_ffghps);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffghsp", XS_Astro__FITS__CFITSIO_ffghsp);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_hdrspace", XS_Astro__FITS__CFITSIO_ffghsp);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_hdrspace", XS_Astro__FITS__CFITSIO_ffghsp);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffghdn", XS_Astro__FITS__CFITSIO_ffghdn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_hdu_num", XS_Astro__FITS__CFITSIO_ffghdn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_hdu_num", XS_Astro__FITS__CFITSIO_ffghdn);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffghdt", XS_Astro__FITS__CFITSIO_ffghdt);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_hdu_type", XS_Astro__FITS__CFITSIO_ffghdt);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_hdu_type", XS_Astro__FITS__CFITSIO_ffghdt);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffghad", XS_Astro__FITS__CFITSIO_ffghad);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_hduaddr", XS_Astro__FITS__CFITSIO_ffghad);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_hduaddr", XS_Astro__FITS__CFITSIO_ffghad);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffghadll", XS_Astro__FITS__CFITSIO_ffghadll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_hduaddrll", XS_Astro__FITS__CFITSIO_ffghadll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_hduaddrll", XS_Astro__FITS__CFITSIO_ffghadll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffghof", XS_Astro__FITS__CFITSIO_ffghof);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_hduoff", XS_Astro__FITS__CFITSIO_ffghof);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_hduoff", XS_Astro__FITS__CFITSIO_ffghof);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgknm", XS_Astro__FITS__CFITSIO_ffgknm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_keyname", XS_Astro__FITS__CFITSIO_ffgknm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdtyp", XS_Astro__FITS__CFITSIO_ffdtyp);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_keytype", XS_Astro__FITS__CFITSIO_ffdtyp);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgidt", XS_Astro__FITS__CFITSIO_ffgidt);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_img_type", XS_Astro__FITS__CFITSIO_ffgidt);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_img_type", XS_Astro__FITS__CFITSIO_ffgidt);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffinttyp", XS_Astro__FITS__CFITSIO_ffinttyp);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_inttype", XS_Astro__FITS__CFITSIO_ffinttyp);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgiet", XS_Astro__FITS__CFITSIO_ffgiet);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_img_equivtype", XS_Astro__FITS__CFITSIO_ffgiet);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_img_equivtype", XS_Astro__FITS__CFITSIO_ffgiet);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgidm", XS_Astro__FITS__CFITSIO_ffgidm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_img_dim", XS_Astro__FITS__CFITSIO_ffgidm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_img_dim", XS_Astro__FITS__CFITSIO_ffgidm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgisz", XS_Astro__FITS__CFITSIO_ffgisz);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_img_size", XS_Astro__FITS__CFITSIO_ffgisz);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_img_size", XS_Astro__FITS__CFITSIO_ffgisz);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgiszll", XS_Astro__FITS__CFITSIO_ffgiszll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_img_sizell", XS_Astro__FITS__CFITSIO_ffgiszll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_img_sizell", XS_Astro__FITS__CFITSIO_ffgiszll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_noise_bits", XS_Astro__FITS__CFITSIO_fits_get_noise_bits);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("fitsfilePtr::get_noise_bits", XS_Astro__FITS__CFITSIO_fits_get_noise_bits);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgncl", XS_Astro__FITS__CFITSIO_ffgncl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_num_cols", XS_Astro__FITS__CFITSIO_ffgncl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_num_cols", XS_Astro__FITS__CFITSIO_ffgncl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgmng", XS_Astro__FITS__CFITSIO_ffgmng);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_num_groups", XS_Astro__FITS__CFITSIO_ffgmng);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_num_groups", XS_Astro__FITS__CFITSIO_ffgmng);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffthdu", XS_Astro__FITS__CFITSIO_ffthdu);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_num_hdus", XS_Astro__FITS__CFITSIO_ffthdu);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_num_hdus", XS_Astro__FITS__CFITSIO_ffthdu);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtnm", XS_Astro__FITS__CFITSIO_ffgtnm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_num_members", XS_Astro__FITS__CFITSIO_ffgtnm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_num_members", XS_Astro__FITS__CFITSIO_ffgtnm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgnrw", XS_Astro__FITS__CFITSIO_ffgnrw);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_num_rows", XS_Astro__FITS__CFITSIO_ffgnrw);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_num_rows", XS_Astro__FITS__CFITSIO_ffgnrw);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgnrwll", XS_Astro__FITS__CFITSIO_ffgnrwll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_num_rowsll", XS_Astro__FITS__CFITSIO_ffgnrwll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_num_rowsll", XS_Astro__FITS__CFITSIO_ffgnrwll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgrsz", XS_Astro__FITS__CFITSIO_ffgrsz);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_rowsize", XS_Astro__FITS__CFITSIO_ffgrsz);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_rowsize", XS_Astro__FITS__CFITSIO_ffgrsz);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgstm", XS_Astro__FITS__CFITSIO_ffgstm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_system_time", XS_Astro__FITS__CFITSIO_ffgstm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgabc", XS_Astro__FITS__CFITSIO_ffgabc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_tbcol", XS_Astro__FITS__CFITSIO_ffgabc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_tile_dim", XS_Astro__FITS__CFITSIO_fits_get_tile_dim);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("fitsfilePtr::get_tile_dim", XS_Astro__FITS__CFITSIO_fits_get_tile_dim);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffvers", XS_Astro__FITS__CFITSIO_ffvers);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_version", XS_Astro__FITS__CFITSIO_ffvers);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffhdr2str", XS_Astro__FITS__CFITSIO_ffhdr2str);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_hdr2str", XS_Astro__FITS__CFITSIO_ffhdr2str);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::hdr2str", XS_Astro__FITS__CFITSIO_ffhdr2str);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffcnvthdr2str", XS_Astro__FITS__CFITSIO_ffcnvthdr2str);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_convert_hdr2str", XS_Astro__FITS__CFITSIO_ffcnvthdr2str);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::convert_hdr2str", XS_Astro__FITS__CFITSIO_ffcnvthdr2str);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffitab", XS_Astro__FITS__CFITSIO_ffitab);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_atbl", XS_Astro__FITS__CFITSIO_ffitab);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_atbl", XS_Astro__FITS__CFITSIO_ffitab);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffibin", XS_Astro__FITS__CFITSIO_ffibin);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_btbl", XS_Astro__FITS__CFITSIO_ffibin);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_btbl", XS_Astro__FITS__CFITSIO_ffibin);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fficol", XS_Astro__FITS__CFITSIO_fficol);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_col", XS_Astro__FITS__CFITSIO_fficol);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_col", XS_Astro__FITS__CFITSIO_fficol);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fficls", XS_Astro__FITS__CFITSIO_fficls);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_cols", XS_Astro__FITS__CFITSIO_fficls);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_cols", XS_Astro__FITS__CFITSIO_fficls);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtis", XS_Astro__FITS__CFITSIO_ffgtis);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_group", XS_Astro__FITS__CFITSIO_ffgtis);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_group", XS_Astro__FITS__CFITSIO_ffgtis);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffiimg", XS_Astro__FITS__CFITSIO_ffiimg);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_img", XS_Astro__FITS__CFITSIO_ffiimg);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_img", XS_Astro__FITS__CFITSIO_ffiimg);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffiimgll", XS_Astro__FITS__CFITSIO_ffiimgll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_imgll", XS_Astro__FITS__CFITSIO_ffiimgll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_imgll", XS_Astro__FITS__CFITSIO_ffiimgll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffikyu", XS_Astro__FITS__CFITSIO_ffikyu);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_key_null", XS_Astro__FITS__CFITSIO_ffikyu);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_key_null", XS_Astro__FITS__CFITSIO_ffikyu);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffikys", XS_Astro__FITS__CFITSIO_ffikys);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_key_str", XS_Astro__FITS__CFITSIO_ffikys);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_key_str", XS_Astro__FITS__CFITSIO_ffikys);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffikyl", XS_Astro__FITS__CFITSIO_ffikyl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_key_log", XS_Astro__FITS__CFITSIO_ffikyl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_key_log", XS_Astro__FITS__CFITSIO_ffikyl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffikyj", XS_Astro__FITS__CFITSIO_ffikyj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_key_lng", XS_Astro__FITS__CFITSIO_ffikyj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_key_lng", XS_Astro__FITS__CFITSIO_ffikyj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffikye", XS_Astro__FITS__CFITSIO_ffikye);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_key_flt", XS_Astro__FITS__CFITSIO_ffikye);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_key_flt", XS_Astro__FITS__CFITSIO_ffikye);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffikyf", XS_Astro__FITS__CFITSIO_ffikyf);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_key_fixflt", XS_Astro__FITS__CFITSIO_ffikyf);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_key_fixflt", XS_Astro__FITS__CFITSIO_ffikyf);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffikyd", XS_Astro__FITS__CFITSIO_ffikyd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_key_dbl", XS_Astro__FITS__CFITSIO_ffikyd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_key_dbl", XS_Astro__FITS__CFITSIO_ffikyd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffikyg", XS_Astro__FITS__CFITSIO_ffikyg);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_key_fixdbl", XS_Astro__FITS__CFITSIO_ffikyg);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_key_fixdbl", XS_Astro__FITS__CFITSIO_ffikyg);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffikyc", XS_Astro__FITS__CFITSIO_ffikyc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_key_cmp", XS_Astro__FITS__CFITSIO_ffikyc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_key_cmp", XS_Astro__FITS__CFITSIO_ffikyc);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffikfc", XS_Astro__FITS__CFITSIO_ffikfc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_key_fixcmp", XS_Astro__FITS__CFITSIO_ffikfc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_key_fixcmp", XS_Astro__FITS__CFITSIO_ffikfc);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffikym", XS_Astro__FITS__CFITSIO_ffikym);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_key_dblcmp", XS_Astro__FITS__CFITSIO_ffikym);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_key_dblcmp", XS_Astro__FITS__CFITSIO_ffikym);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffikfm", XS_Astro__FITS__CFITSIO_ffikfm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_key_fixdblcmp", XS_Astro__FITS__CFITSIO_ffikfm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_key_fixdblcmp", XS_Astro__FITS__CFITSIO_ffikfm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffirec", XS_Astro__FITS__CFITSIO_ffirec);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_record", XS_Astro__FITS__CFITSIO_ffirec);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_record", XS_Astro__FITS__CFITSIO_ffirec);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffikey", XS_Astro__FITS__CFITSIO_ffikey);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_card", XS_Astro__FITS__CFITSIO_ffikey);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_card", XS_Astro__FITS__CFITSIO_ffikey);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffirow", XS_Astro__FITS__CFITSIO_ffirow);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_rows", XS_Astro__FITS__CFITSIO_ffirow);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_rows", XS_Astro__FITS__CFITSIO_ffirow);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffkeyn", XS_Astro__FITS__CFITSIO_ffkeyn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_make_keyn", XS_Astro__FITS__CFITSIO_ffkeyn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffnkey", XS_Astro__FITS__CFITSIO_ffnkey);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_make_nkey", XS_Astro__FITS__CFITSIO_ffnkey);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmkky", XS_Astro__FITS__CFITSIO_ffmkky);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_make_key", XS_Astro__FITS__CFITSIO_ffmkky);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtmg", XS_Astro__FITS__CFITSIO_ffgtmg);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_merge_groups", XS_Astro__FITS__CFITSIO_ffgtmg);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::merge_groups", XS_Astro__FITS__CFITSIO_ffgtmg);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmbyt", XS_Astro__FITS__CFITSIO_ffmbyt);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_seek", XS_Astro__FITS__CFITSIO_ffmbyt);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::seek", XS_Astro__FITS__CFITSIO_ffmbyt);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmcrd", XS_Astro__FITS__CFITSIO_ffmcrd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_card", XS_Astro__FITS__CFITSIO_ffmcrd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_card", XS_Astro__FITS__CFITSIO_ffmcrd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmcom", XS_Astro__FITS__CFITSIO_ffmcom);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_comment", XS_Astro__FITS__CFITSIO_ffmcom);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_comment", XS_Astro__FITS__CFITSIO_ffmcom);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmkyu", XS_Astro__FITS__CFITSIO_ffmkyu);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_key_null", XS_Astro__FITS__CFITSIO_ffmkyu);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_key_null", XS_Astro__FITS__CFITSIO_ffmkyu);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmkys", XS_Astro__FITS__CFITSIO_ffmkys);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_key_str", XS_Astro__FITS__CFITSIO_ffmkys);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_key_str", XS_Astro__FITS__CFITSIO_ffmkys);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmkyl", XS_Astro__FITS__CFITSIO_ffmkyl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_key_log", XS_Astro__FITS__CFITSIO_ffmkyl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_key_log", XS_Astro__FITS__CFITSIO_ffmkyl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmkyj", XS_Astro__FITS__CFITSIO_ffmkyj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_key_lng", XS_Astro__FITS__CFITSIO_ffmkyj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_key_lng", XS_Astro__FITS__CFITSIO_ffmkyj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmkye", XS_Astro__FITS__CFITSIO_ffmkye);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_key_flt", XS_Astro__FITS__CFITSIO_ffmkye);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_key_flt", XS_Astro__FITS__CFITSIO_ffmkye);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmkyf", XS_Astro__FITS__CFITSIO_ffmkyf);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_key_fixflt", XS_Astro__FITS__CFITSIO_ffmkyf);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_key_fixflt", XS_Astro__FITS__CFITSIO_ffmkyf);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmkyd", XS_Astro__FITS__CFITSIO_ffmkyd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_key_dbl", XS_Astro__FITS__CFITSIO_ffmkyd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_key_dbl", XS_Astro__FITS__CFITSIO_ffmkyd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmkyg", XS_Astro__FITS__CFITSIO_ffmkyg);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_key_fixdbl", XS_Astro__FITS__CFITSIO_ffmkyg);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_key_fixdbl", XS_Astro__FITS__CFITSIO_ffmkyg);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmkyc", XS_Astro__FITS__CFITSIO_ffmkyc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_key_cmp", XS_Astro__FITS__CFITSIO_ffmkyc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_key_cmp", XS_Astro__FITS__CFITSIO_ffmkyc);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmkfc", XS_Astro__FITS__CFITSIO_ffmkfc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_key_fixcmp", XS_Astro__FITS__CFITSIO_ffmkfc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_key_fixcmp", XS_Astro__FITS__CFITSIO_ffmkfc);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmkym", XS_Astro__FITS__CFITSIO_ffmkym);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_key_dblcmp", XS_Astro__FITS__CFITSIO_ffmkym);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_key_dblcmp", XS_Astro__FITS__CFITSIO_ffmkym);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmkfm", XS_Astro__FITS__CFITSIO_ffmkfm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_key_fixdblcmp", XS_Astro__FITS__CFITSIO_ffmkfm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_key_fixdblcmp", XS_Astro__FITS__CFITSIO_ffmkfm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmnam", XS_Astro__FITS__CFITSIO_ffmnam);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_name", XS_Astro__FITS__CFITSIO_ffmnam);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_name", XS_Astro__FITS__CFITSIO_ffmnam);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmrec", XS_Astro__FITS__CFITSIO_ffmrec);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_record", XS_Astro__FITS__CFITSIO_ffmrec);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_record", XS_Astro__FITS__CFITSIO_ffmrec);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmvec", XS_Astro__FITS__CFITSIO_ffmvec);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_vector_len", XS_Astro__FITS__CFITSIO_ffmvec);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_vector_len", XS_Astro__FITS__CFITSIO_ffmvec);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmahd", XS_Astro__FITS__CFITSIO_ffmahd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_movabs_hdu", XS_Astro__FITS__CFITSIO_ffmahd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::movabs_hdu", XS_Astro__FITS__CFITSIO_ffmahd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmnhd", XS_Astro__FITS__CFITSIO_ffmnhd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_movnam_hdu", XS_Astro__FITS__CFITSIO_ffmnhd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::movnam_hdu", XS_Astro__FITS__CFITSIO_ffmnhd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmrhd", XS_Astro__FITS__CFITSIO_ffmrhd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_movrel_hdu", XS_Astro__FITS__CFITSIO_ffmrhd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::movrel_hdu", XS_Astro__FITS__CFITSIO_ffmrhd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffnchk", XS_Astro__FITS__CFITSIO_ffnchk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_null_check", XS_Astro__FITS__CFITSIO_ffnchk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::null_check", XS_Astro__FITS__CFITSIO_ffnchk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::open_data", XS_Astro__FITS__CFITSIO_open_file);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::open_diskfile", XS_Astro__FITS__CFITSIO_open_file);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::open_file", XS_Astro__FITS__CFITSIO_open_file);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::open_image", XS_Astro__FITS__CFITSIO_open_file);
        XSANY.any_i32 = 3;
        cv = newXS_deffile("Astro::FITS::CFITSIO::open_table", XS_Astro__FITS__CFITSIO_open_file);
        XSANY.any_i32 = 4;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffopen", XS_Astro__FITS__CFITSIO_ffopen);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_open_file", XS_Astro__FITS__CFITSIO_ffopen);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdkopn", XS_Astro__FITS__CFITSIO_ffdkopn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_open_diskfile", XS_Astro__FITS__CFITSIO_ffdkopn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdopn", XS_Astro__FITS__CFITSIO_ffdopn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_open_data", XS_Astro__FITS__CFITSIO_ffdopn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffiopn", XS_Astro__FITS__CFITSIO_ffiopn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_open_image", XS_Astro__FITS__CFITSIO_ffiopn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fftopn", XS_Astro__FITS__CFITSIO_fftopn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_open_table", XS_Astro__FITS__CFITSIO_fftopn);
        XSANY.any_i32 = 1;
#if XSubPPtmpAAAB
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffeopn", XS_Astro__FITS__CFITSIO_ffeopn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_open_extlist", XS_Astro__FITS__CFITSIO_ffeopn);
        XSANY.any_i32 = 1;
#endif
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtop", XS_Astro__FITS__CFITSIO_ffgtop);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_open_group", XS_Astro__FITS__CFITSIO_ffgtop);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::open_group", XS_Astro__FITS__CFITSIO_ffgtop);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgmop", XS_Astro__FITS__CFITSIO_ffgmop);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_open_member", XS_Astro__FITS__CFITSIO_ffgmop);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::open_member", XS_Astro__FITS__CFITSIO_ffgmop);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffextn", XS_Astro__FITS__CFITSIO_ffextn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_parse_extnum", XS_Astro__FITS__CFITSIO_ffextn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffiurl", XS_Astro__FITS__CFITSIO_ffiurl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_parse_input_url", XS_Astro__FITS__CFITSIO_ffiurl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffifile", XS_Astro__FITS__CFITSIO_ffifile);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_parse_input_filename", XS_Astro__FITS__CFITSIO_ffifile);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_copy_cell2image", XS_Astro__FITS__CFITSIO_fits_copy_cell2image);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("fitsfilePtr::copy_cell2image", XS_Astro__FITS__CFITSIO_fits_copy_cell2image);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_copy_image2cell", XS_Astro__FITS__CFITSIO_fits_copy_image2cell);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("fitsfilePtr::copy_image2cell", XS_Astro__FITS__CFITSIO_fits_copy_image2cell);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffrwrg", XS_Astro__FITS__CFITSIO_ffrwrg);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_parse_range", XS_Astro__FITS__CFITSIO_ffrwrg);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffrwrgll", XS_Astro__FITS__CFITSIO_ffrwrgll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_parse_rangell", XS_Astro__FITS__CFITSIO_ffrwrgll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffrtnm", XS_Astro__FITS__CFITSIO_ffrtnm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_parse_rootname", XS_Astro__FITS__CFITSIO_ffrtnm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgthd", XS_Astro__FITS__CFITSIO_ffgthd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_parse_template", XS_Astro__FITS__CFITSIO_ffgthd);
        XSANY.any_i32 = 1;
        newXS_deffile("Astro::FITS::CFITSIO::fits_translate_keyword", XS_Astro__FITS__CFITSIO_fits_translate_keyword);
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_translate_keywords", XS_Astro__FITS__CFITSIO_fits_translate_keywords);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("fitsfilePtr::translate_keywords", XS_Astro__FITS__CFITSIO_fits_translate_keywords);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpsvc", XS_Astro__FITS__CFITSIO_ffpsvc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_parse_value", XS_Astro__FITS__CFITSIO_ffpsvc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffwldp", XS_Astro__FITS__CFITSIO_ffwldp);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_pix_to_world", XS_Astro__FITS__CFITSIO_ffwldp);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg2db", XS_Astro__FITS__CFITSIO_ffg2db);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_2d_byt", XS_Astro__FITS__CFITSIO_ffg2db);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_2d_byt", XS_Astro__FITS__CFITSIO_ffg2db);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg2dsb", XS_Astro__FITS__CFITSIO_ffg2dsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_2d_sbyt", XS_Astro__FITS__CFITSIO_ffg2dsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_2d_sbyt", XS_Astro__FITS__CFITSIO_ffg2dsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg2dui", XS_Astro__FITS__CFITSIO_ffg2dui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_2d_usht", XS_Astro__FITS__CFITSIO_ffg2dui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_2d_usht", XS_Astro__FITS__CFITSIO_ffg2dui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg2di", XS_Astro__FITS__CFITSIO_ffg2di);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_2d_sht", XS_Astro__FITS__CFITSIO_ffg2di);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_2d_sht", XS_Astro__FITS__CFITSIO_ffg2di);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg2duk", XS_Astro__FITS__CFITSIO_ffg2duk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_2d_uint", XS_Astro__FITS__CFITSIO_ffg2duk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_2d_uint", XS_Astro__FITS__CFITSIO_ffg2duk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg2dk", XS_Astro__FITS__CFITSIO_ffg2dk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_2d_int", XS_Astro__FITS__CFITSIO_ffg2dk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_2d_int", XS_Astro__FITS__CFITSIO_ffg2dk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg2duj", XS_Astro__FITS__CFITSIO_ffg2duj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_2d_ulng", XS_Astro__FITS__CFITSIO_ffg2duj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_2d_ulng", XS_Astro__FITS__CFITSIO_ffg2duj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg2dj", XS_Astro__FITS__CFITSIO_ffg2dj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_2d_lng", XS_Astro__FITS__CFITSIO_ffg2dj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_2d_lng", XS_Astro__FITS__CFITSIO_ffg2dj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg2djj", XS_Astro__FITS__CFITSIO_ffg2djj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_2d_lnglng", XS_Astro__FITS__CFITSIO_ffg2djj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_2d_lnglng", XS_Astro__FITS__CFITSIO_ffg2djj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg2de", XS_Astro__FITS__CFITSIO_ffg2de);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_2d_flt", XS_Astro__FITS__CFITSIO_ffg2de);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_2d_flt", XS_Astro__FITS__CFITSIO_ffg2de);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg2dd", XS_Astro__FITS__CFITSIO_ffg2dd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_2d_dbl", XS_Astro__FITS__CFITSIO_ffg2dd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_2d_dbl", XS_Astro__FITS__CFITSIO_ffg2dd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg3db", XS_Astro__FITS__CFITSIO_ffg3db);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_3d_byt", XS_Astro__FITS__CFITSIO_ffg3db);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_3d_byt", XS_Astro__FITS__CFITSIO_ffg3db);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg3dsb", XS_Astro__FITS__CFITSIO_ffg3dsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_3d_sbyt", XS_Astro__FITS__CFITSIO_ffg3dsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_3d_sbyt", XS_Astro__FITS__CFITSIO_ffg3dsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg3dui", XS_Astro__FITS__CFITSIO_ffg3dui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_3d_usht", XS_Astro__FITS__CFITSIO_ffg3dui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_3d_usht", XS_Astro__FITS__CFITSIO_ffg3dui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg3di", XS_Astro__FITS__CFITSIO_ffg3di);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_3d_sht", XS_Astro__FITS__CFITSIO_ffg3di);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_3d_sht", XS_Astro__FITS__CFITSIO_ffg3di);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg3duk", XS_Astro__FITS__CFITSIO_ffg3duk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_3d_uint", XS_Astro__FITS__CFITSIO_ffg3duk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_3d_uint", XS_Astro__FITS__CFITSIO_ffg3duk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg3dk", XS_Astro__FITS__CFITSIO_ffg3dk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_3d_int", XS_Astro__FITS__CFITSIO_ffg3dk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_3d_int", XS_Astro__FITS__CFITSIO_ffg3dk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg3duj", XS_Astro__FITS__CFITSIO_ffg3duj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_3d_ulng", XS_Astro__FITS__CFITSIO_ffg3duj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_3d_ulng", XS_Astro__FITS__CFITSIO_ffg3duj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg3dj", XS_Astro__FITS__CFITSIO_ffg3dj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_3d_lng", XS_Astro__FITS__CFITSIO_ffg3dj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_3d_lng", XS_Astro__FITS__CFITSIO_ffg3dj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg3djj", XS_Astro__FITS__CFITSIO_ffg3djj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_3d_lnglng", XS_Astro__FITS__CFITSIO_ffg3djj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_3d_lnglng", XS_Astro__FITS__CFITSIO_ffg3djj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg3de", XS_Astro__FITS__CFITSIO_ffg3de);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_3d_flt", XS_Astro__FITS__CFITSIO_ffg3de);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_3d_flt", XS_Astro__FITS__CFITSIO_ffg3de);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffg3dd", XS_Astro__FITS__CFITSIO_ffg3dd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_3d_dbl", XS_Astro__FITS__CFITSIO_ffg3dd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_3d_dbl", XS_Astro__FITS__CFITSIO_ffg3dd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcdw", XS_Astro__FITS__CFITSIO_ffgcdw);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_col_display_width", XS_Astro__FITS__CFITSIO_ffgcdw);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_col_display_width", XS_Astro__FITS__CFITSIO_ffgcdw);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffghtb", XS_Astro__FITS__CFITSIO_ffghtb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_atblhdr", XS_Astro__FITS__CFITSIO_ffghtb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_atblhdr", XS_Astro__FITS__CFITSIO_ffghtb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffghtbll", XS_Astro__FITS__CFITSIO_ffghtbll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_atblhdrll", XS_Astro__FITS__CFITSIO_ffghtbll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_atblhdrll", XS_Astro__FITS__CFITSIO_ffghtbll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffghbn", XS_Astro__FITS__CFITSIO_ffghbn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_btblhdr", XS_Astro__FITS__CFITSIO_ffghbn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_btblhdr", XS_Astro__FITS__CFITSIO_ffghbn);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffghbnll", XS_Astro__FITS__CFITSIO_ffghbnll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_btblhdrll", XS_Astro__FITS__CFITSIO_ffghbnll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_btblhdrll", XS_Astro__FITS__CFITSIO_ffghbnll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcrd", XS_Astro__FITS__CFITSIO_ffgcrd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_card", XS_Astro__FITS__CFITSIO_ffgcrd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_card", XS_Astro__FITS__CFITSIO_ffgcrd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcv", XS_Astro__FITS__CFITSIO_ffgcv);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col", XS_Astro__FITS__CFITSIO_ffgcv);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col", XS_Astro__FITS__CFITSIO_ffgcv);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcx", XS_Astro__FITS__CFITSIO_ffgcx);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_bit", XS_Astro__FITS__CFITSIO_ffgcx);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_bit", XS_Astro__FITS__CFITSIO_ffgcx);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcxui", XS_Astro__FITS__CFITSIO_ffgcxui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_bit_usht", XS_Astro__FITS__CFITSIO_ffgcxui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_bit_usht", XS_Astro__FITS__CFITSIO_ffgcxui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcxuk", XS_Astro__FITS__CFITSIO_ffgcxuk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_bit_uint", XS_Astro__FITS__CFITSIO_ffgcxuk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_bit_uint", XS_Astro__FITS__CFITSIO_ffgcxuk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcvs", XS_Astro__FITS__CFITSIO_ffgcvs);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_str", XS_Astro__FITS__CFITSIO_ffgcvs);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_str", XS_Astro__FITS__CFITSIO_ffgcvs);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcvl", XS_Astro__FITS__CFITSIO_ffgcvl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_log", XS_Astro__FITS__CFITSIO_ffgcvl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_log", XS_Astro__FITS__CFITSIO_ffgcvl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcvb", XS_Astro__FITS__CFITSIO_ffgcvb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_byt", XS_Astro__FITS__CFITSIO_ffgcvb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_byt", XS_Astro__FITS__CFITSIO_ffgcvb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcvsb", XS_Astro__FITS__CFITSIO_ffgcvsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_sbyt", XS_Astro__FITS__CFITSIO_ffgcvsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_sbyt", XS_Astro__FITS__CFITSIO_ffgcvsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcvui", XS_Astro__FITS__CFITSIO_ffgcvui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_usht", XS_Astro__FITS__CFITSIO_ffgcvui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_usht", XS_Astro__FITS__CFITSIO_ffgcvui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcvi", XS_Astro__FITS__CFITSIO_ffgcvi);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_sht", XS_Astro__FITS__CFITSIO_ffgcvi);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_sht", XS_Astro__FITS__CFITSIO_ffgcvi);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcvuk", XS_Astro__FITS__CFITSIO_ffgcvuk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_uint", XS_Astro__FITS__CFITSIO_ffgcvuk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_uint", XS_Astro__FITS__CFITSIO_ffgcvuk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcvk", XS_Astro__FITS__CFITSIO_ffgcvk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_int", XS_Astro__FITS__CFITSIO_ffgcvk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_int", XS_Astro__FITS__CFITSIO_ffgcvk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcvuj", XS_Astro__FITS__CFITSIO_ffgcvuj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_ulng", XS_Astro__FITS__CFITSIO_ffgcvuj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_ulng", XS_Astro__FITS__CFITSIO_ffgcvuj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcvj", XS_Astro__FITS__CFITSIO_ffgcvj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_lng", XS_Astro__FITS__CFITSIO_ffgcvj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_lng", XS_Astro__FITS__CFITSIO_ffgcvj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcvjj", XS_Astro__FITS__CFITSIO_ffgcvjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_lnglng", XS_Astro__FITS__CFITSIO_ffgcvjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_lnglng", XS_Astro__FITS__CFITSIO_ffgcvjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcve", XS_Astro__FITS__CFITSIO_ffgcve);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_flt", XS_Astro__FITS__CFITSIO_ffgcve);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_flt", XS_Astro__FITS__CFITSIO_ffgcve);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcvd", XS_Astro__FITS__CFITSIO_ffgcvd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_dbl", XS_Astro__FITS__CFITSIO_ffgcvd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_dbl", XS_Astro__FITS__CFITSIO_ffgcvd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcvc", XS_Astro__FITS__CFITSIO_ffgcvc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_cmp", XS_Astro__FITS__CFITSIO_ffgcvc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_cmp", XS_Astro__FITS__CFITSIO_ffgcvc);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcvm", XS_Astro__FITS__CFITSIO_ffgcvm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_col_dblcmp", XS_Astro__FITS__CFITSIO_ffgcvm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_col_dblcmp", XS_Astro__FITS__CFITSIO_ffgcvm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcf", XS_Astro__FITS__CFITSIO_ffgcf);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull", XS_Astro__FITS__CFITSIO_ffgcf);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull", XS_Astro__FITS__CFITSIO_ffgcf);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfs", XS_Astro__FITS__CFITSIO_ffgcfs);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_str", XS_Astro__FITS__CFITSIO_ffgcfs);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_str", XS_Astro__FITS__CFITSIO_ffgcfs);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfl", XS_Astro__FITS__CFITSIO_ffgcfl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_log", XS_Astro__FITS__CFITSIO_ffgcfl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_log", XS_Astro__FITS__CFITSIO_ffgcfl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfb", XS_Astro__FITS__CFITSIO_ffgcfb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_byt", XS_Astro__FITS__CFITSIO_ffgcfb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_byt", XS_Astro__FITS__CFITSIO_ffgcfb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfsb", XS_Astro__FITS__CFITSIO_ffgcfsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_sbyt", XS_Astro__FITS__CFITSIO_ffgcfsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_sbyt", XS_Astro__FITS__CFITSIO_ffgcfsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfui", XS_Astro__FITS__CFITSIO_ffgcfui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_usht", XS_Astro__FITS__CFITSIO_ffgcfui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_usht", XS_Astro__FITS__CFITSIO_ffgcfui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfi", XS_Astro__FITS__CFITSIO_ffgcfi);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_sht", XS_Astro__FITS__CFITSIO_ffgcfi);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_sht", XS_Astro__FITS__CFITSIO_ffgcfi);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfk", XS_Astro__FITS__CFITSIO_ffgcfk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_int", XS_Astro__FITS__CFITSIO_ffgcfk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_int", XS_Astro__FITS__CFITSIO_ffgcfk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfuk", XS_Astro__FITS__CFITSIO_ffgcfuk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_uint", XS_Astro__FITS__CFITSIO_ffgcfuk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_uint", XS_Astro__FITS__CFITSIO_ffgcfuk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfj", XS_Astro__FITS__CFITSIO_ffgcfj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_lng", XS_Astro__FITS__CFITSIO_ffgcfj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_lng", XS_Astro__FITS__CFITSIO_ffgcfj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfjj", XS_Astro__FITS__CFITSIO_ffgcfjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_lnglng", XS_Astro__FITS__CFITSIO_ffgcfjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_lnglng", XS_Astro__FITS__CFITSIO_ffgcfjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfuj", XS_Astro__FITS__CFITSIO_ffgcfuj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_ulng", XS_Astro__FITS__CFITSIO_ffgcfuj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_ulng", XS_Astro__FITS__CFITSIO_ffgcfuj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfe", XS_Astro__FITS__CFITSIO_ffgcfe);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_flt", XS_Astro__FITS__CFITSIO_ffgcfe);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_flt", XS_Astro__FITS__CFITSIO_ffgcfe);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfd", XS_Astro__FITS__CFITSIO_ffgcfd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_dbl", XS_Astro__FITS__CFITSIO_ffgcfd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_dbl", XS_Astro__FITS__CFITSIO_ffgcfd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfc", XS_Astro__FITS__CFITSIO_ffgcfc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_cmp", XS_Astro__FITS__CFITSIO_ffgcfc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_cmp", XS_Astro__FITS__CFITSIO_ffgcfc);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgcfm", XS_Astro__FITS__CFITSIO_ffgcfm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_colnull_dblcmp", XS_Astro__FITS__CFITSIO_ffgcfm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_colnull_dblcmp", XS_Astro__FITS__CFITSIO_ffgcfm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgdes", XS_Astro__FITS__CFITSIO_ffgdes);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_descript", XS_Astro__FITS__CFITSIO_ffgdes);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_descript", XS_Astro__FITS__CFITSIO_ffgdes);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgdesll", XS_Astro__FITS__CFITSIO_ffgdesll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_descriptll", XS_Astro__FITS__CFITSIO_ffgdesll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_descriptll", XS_Astro__FITS__CFITSIO_ffgdesll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgdess", XS_Astro__FITS__CFITSIO_ffgdess);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_descripts", XS_Astro__FITS__CFITSIO_ffgdess);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_descripts", XS_Astro__FITS__CFITSIO_ffgdess);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgdessll", XS_Astro__FITS__CFITSIO_ffgdessll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_descriptsll", XS_Astro__FITS__CFITSIO_ffgdessll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_descriptsll", XS_Astro__FITS__CFITSIO_ffgdessll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgmsg", XS_Astro__FITS__CFITSIO_ffgmsg);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_errmsg", XS_Astro__FITS__CFITSIO_ffgmsg);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffggpb", XS_Astro__FITS__CFITSIO_ffggpb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_grppar_byt", XS_Astro__FITS__CFITSIO_ffggpb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_grppar_byt", XS_Astro__FITS__CFITSIO_ffggpb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffggpsb", XS_Astro__FITS__CFITSIO_ffggpsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_grppar_sbyt", XS_Astro__FITS__CFITSIO_ffggpsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_grppar_sbyt", XS_Astro__FITS__CFITSIO_ffggpsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffggpi", XS_Astro__FITS__CFITSIO_ffggpi);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_grppar_sht", XS_Astro__FITS__CFITSIO_ffggpi);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_grppar_sht", XS_Astro__FITS__CFITSIO_ffggpi);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffggpui", XS_Astro__FITS__CFITSIO_ffggpui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_grppar_usht", XS_Astro__FITS__CFITSIO_ffggpui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_grppar_usht", XS_Astro__FITS__CFITSIO_ffggpui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffggpk", XS_Astro__FITS__CFITSIO_ffggpk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_grppar_int", XS_Astro__FITS__CFITSIO_ffggpk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_grppar_int", XS_Astro__FITS__CFITSIO_ffggpk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffggpuk", XS_Astro__FITS__CFITSIO_ffggpuk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_grppar_uint", XS_Astro__FITS__CFITSIO_ffggpuk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_grppar_uint", XS_Astro__FITS__CFITSIO_ffggpuk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffggpj", XS_Astro__FITS__CFITSIO_ffggpj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_grppar_lng", XS_Astro__FITS__CFITSIO_ffggpj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_grppar_lng", XS_Astro__FITS__CFITSIO_ffggpj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffggpjj", XS_Astro__FITS__CFITSIO_ffggpjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_grppar_lnglng", XS_Astro__FITS__CFITSIO_ffggpjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_grppar_lnglng", XS_Astro__FITS__CFITSIO_ffggpjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffggpuj", XS_Astro__FITS__CFITSIO_ffggpuj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_grppar_ulng", XS_Astro__FITS__CFITSIO_ffggpuj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_grppar_ulng", XS_Astro__FITS__CFITSIO_ffggpuj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffggpe", XS_Astro__FITS__CFITSIO_ffggpe);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_grppar_flt", XS_Astro__FITS__CFITSIO_ffggpe);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_grppar_flt", XS_Astro__FITS__CFITSIO_ffggpe);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffggpd", XS_Astro__FITS__CFITSIO_ffggpd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_grppar_dbl", XS_Astro__FITS__CFITSIO_ffggpd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_grppar_dbl", XS_Astro__FITS__CFITSIO_ffggpd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpv", XS_Astro__FITS__CFITSIO_ffgpv);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_img", XS_Astro__FITS__CFITSIO_ffgpv);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_img", XS_Astro__FITS__CFITSIO_ffgpv);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgics", XS_Astro__FITS__CFITSIO_ffgics);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_img_coord", XS_Astro__FITS__CFITSIO_ffgics);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_img_coord", XS_Astro__FITS__CFITSIO_ffgics);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgicsa", XS_Astro__FITS__CFITSIO_ffgicsa);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_img_coord_version", XS_Astro__FITS__CFITSIO_ffgicsa);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_img_coord_version", XS_Astro__FITS__CFITSIO_ffgicsa);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpvb", XS_Astro__FITS__CFITSIO_ffgpvb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_img_byt", XS_Astro__FITS__CFITSIO_ffgpvb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_img_byt", XS_Astro__FITS__CFITSIO_ffgpvb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpvsb", XS_Astro__FITS__CFITSIO_ffgpvsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_img_sbyt", XS_Astro__FITS__CFITSIO_ffgpvsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_img_sbyt", XS_Astro__FITS__CFITSIO_ffgpvsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpvi", XS_Astro__FITS__CFITSIO_ffgpvi);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_img_sht", XS_Astro__FITS__CFITSIO_ffgpvi);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_img_sht", XS_Astro__FITS__CFITSIO_ffgpvi);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpvui", XS_Astro__FITS__CFITSIO_ffgpvui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_img_usht", XS_Astro__FITS__CFITSIO_ffgpvui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_img_usht", XS_Astro__FITS__CFITSIO_ffgpvui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpvk", XS_Astro__FITS__CFITSIO_ffgpvk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_img_int", XS_Astro__FITS__CFITSIO_ffgpvk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_img_int", XS_Astro__FITS__CFITSIO_ffgpvk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpvuk", XS_Astro__FITS__CFITSIO_ffgpvuk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_img_uint", XS_Astro__FITS__CFITSIO_ffgpvuk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_img_uint", XS_Astro__FITS__CFITSIO_ffgpvuk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpvj", XS_Astro__FITS__CFITSIO_ffgpvj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_img_lng", XS_Astro__FITS__CFITSIO_ffgpvj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_img_lng", XS_Astro__FITS__CFITSIO_ffgpvj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpvjj", XS_Astro__FITS__CFITSIO_ffgpvjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_img_lnglng", XS_Astro__FITS__CFITSIO_ffgpvjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_img_lnglng", XS_Astro__FITS__CFITSIO_ffgpvjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpvuj", XS_Astro__FITS__CFITSIO_ffgpvuj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_img_ulng", XS_Astro__FITS__CFITSIO_ffgpvuj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_img_ulng", XS_Astro__FITS__CFITSIO_ffgpvuj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpve", XS_Astro__FITS__CFITSIO_ffgpve);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_img_flt", XS_Astro__FITS__CFITSIO_ffgpve);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_img_flt", XS_Astro__FITS__CFITSIO_ffgpve);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpvd", XS_Astro__FITS__CFITSIO_ffgpvd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_img_dbl", XS_Astro__FITS__CFITSIO_ffgpvd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_img_dbl", XS_Astro__FITS__CFITSIO_ffgpvd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffghpr", XS_Astro__FITS__CFITSIO_ffghpr);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_imghdr", XS_Astro__FITS__CFITSIO_ffghpr);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_imghdr", XS_Astro__FITS__CFITSIO_ffghpr);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffghprll", XS_Astro__FITS__CFITSIO_ffghprll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_imghdrll", XS_Astro__FITS__CFITSIO_ffghprll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_imghdrll", XS_Astro__FITS__CFITSIO_ffghprll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpf", XS_Astro__FITS__CFITSIO_ffgpf);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_imgnull", XS_Astro__FITS__CFITSIO_ffgpf);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_imgnull", XS_Astro__FITS__CFITSIO_ffgpf);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpfb", XS_Astro__FITS__CFITSIO_ffgpfb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_imgnull_byt", XS_Astro__FITS__CFITSIO_ffgpfb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_imgnull_byt", XS_Astro__FITS__CFITSIO_ffgpfb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpfsb", XS_Astro__FITS__CFITSIO_ffgpfsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_imgnull_sbyt", XS_Astro__FITS__CFITSIO_ffgpfsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_imgnull_sbyt", XS_Astro__FITS__CFITSIO_ffgpfsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpfi", XS_Astro__FITS__CFITSIO_ffgpfi);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_imgnull_sht", XS_Astro__FITS__CFITSIO_ffgpfi);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_imgnull_sht", XS_Astro__FITS__CFITSIO_ffgpfi);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpfui", XS_Astro__FITS__CFITSIO_ffgpfui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_imgnull_usht", XS_Astro__FITS__CFITSIO_ffgpfui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_imgnull_usht", XS_Astro__FITS__CFITSIO_ffgpfui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpfk", XS_Astro__FITS__CFITSIO_ffgpfk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_imgnull_int", XS_Astro__FITS__CFITSIO_ffgpfk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_imgnull_int", XS_Astro__FITS__CFITSIO_ffgpfk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpfuk", XS_Astro__FITS__CFITSIO_ffgpfuk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_imgnull_uint", XS_Astro__FITS__CFITSIO_ffgpfuk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_imgnull_uint", XS_Astro__FITS__CFITSIO_ffgpfuk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpfj", XS_Astro__FITS__CFITSIO_ffgpfj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_imgnull_lng", XS_Astro__FITS__CFITSIO_ffgpfj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_imgnull_lng", XS_Astro__FITS__CFITSIO_ffgpfj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpfjj", XS_Astro__FITS__CFITSIO_ffgpfjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_imgnull_lnglng", XS_Astro__FITS__CFITSIO_ffgpfjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_imgnull_lnglng", XS_Astro__FITS__CFITSIO_ffgpfjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpfuj", XS_Astro__FITS__CFITSIO_ffgpfuj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_imgnull_ulng", XS_Astro__FITS__CFITSIO_ffgpfuj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_imgnull_ulng", XS_Astro__FITS__CFITSIO_ffgpfuj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpfe", XS_Astro__FITS__CFITSIO_ffgpfe);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_imgnull_flt", XS_Astro__FITS__CFITSIO_ffgpfe);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_imgnull_flt", XS_Astro__FITS__CFITSIO_ffgpfe);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpfd", XS_Astro__FITS__CFITSIO_ffgpfd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_imgnull_dbl", XS_Astro__FITS__CFITSIO_ffgpfd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_imgnull_dbl", XS_Astro__FITS__CFITSIO_ffgpfd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgstr", XS_Astro__FITS__CFITSIO_ffgstr);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_str", XS_Astro__FITS__CFITSIO_ffgstr);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_str", XS_Astro__FITS__CFITSIO_ffgstr);
        XSANY.any_i32 = 2;
#if XSubPPtmpAAAC
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgksl", XS_Astro__FITS__CFITSIO_ffgksl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_key_strlen", XS_Astro__FITS__CFITSIO_ffgksl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_key_strlen", XS_Astro__FITS__CFITSIO_ffgksl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsky", XS_Astro__FITS__CFITSIO_ffgsky);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_string_key", XS_Astro__FITS__CFITSIO_ffgsky);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_key_string", XS_Astro__FITS__CFITSIO_ffgsky);
        XSANY.any_i32 = 2;
#endif
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffdstr", XS_Astro__FITS__CFITSIO_ffdstr);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_delete_str", XS_Astro__FITS__CFITSIO_ffdstr);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::delete_str", XS_Astro__FITS__CFITSIO_ffdstr);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgky", XS_Astro__FITS__CFITSIO_ffgky);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_key", XS_Astro__FITS__CFITSIO_ffgky);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_key", XS_Astro__FITS__CFITSIO_ffgky);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkyt", XS_Astro__FITS__CFITSIO_ffgkyt);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_key_triple", XS_Astro__FITS__CFITSIO_ffgkyt);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_key_triple", XS_Astro__FITS__CFITSIO_ffgkyt);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgunt", XS_Astro__FITS__CFITSIO_ffgunt);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_key_unit", XS_Astro__FITS__CFITSIO_ffgunt);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_key_unit", XS_Astro__FITS__CFITSIO_ffgunt);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkls", XS_Astro__FITS__CFITSIO_ffgkls);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_key_longstr", XS_Astro__FITS__CFITSIO_ffgkls);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_key_longstr", XS_Astro__FITS__CFITSIO_ffgkls);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fffree", XS_Astro__FITS__CFITSIO_fffree);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_free_memory", XS_Astro__FITS__CFITSIO_fffree);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_free_memory", XS_Astro__FITS__CFITSIO_fffree);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkys", XS_Astro__FITS__CFITSIO_ffgkys);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_key_str", XS_Astro__FITS__CFITSIO_ffgkys);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_key_str", XS_Astro__FITS__CFITSIO_ffgkys);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkyl", XS_Astro__FITS__CFITSIO_ffgkyl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_key_log", XS_Astro__FITS__CFITSIO_ffgkyl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_key_log", XS_Astro__FITS__CFITSIO_ffgkyl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkyj", XS_Astro__FITS__CFITSIO_ffgkyj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_key_lng", XS_Astro__FITS__CFITSIO_ffgkyj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_key_lng", XS_Astro__FITS__CFITSIO_ffgkyj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkyjj", XS_Astro__FITS__CFITSIO_ffgkyjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_key_lnglng", XS_Astro__FITS__CFITSIO_ffgkyjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_key_lnglng", XS_Astro__FITS__CFITSIO_ffgkyjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkye", XS_Astro__FITS__CFITSIO_ffgkye);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_key_flt", XS_Astro__FITS__CFITSIO_ffgkye);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_key_flt", XS_Astro__FITS__CFITSIO_ffgkye);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkyd", XS_Astro__FITS__CFITSIO_ffgkyd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_key_dbl", XS_Astro__FITS__CFITSIO_ffgkyd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_key_dbl", XS_Astro__FITS__CFITSIO_ffgkyd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkyc", XS_Astro__FITS__CFITSIO_ffgkyc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_key_cmp", XS_Astro__FITS__CFITSIO_ffgkyc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_key_cmp", XS_Astro__FITS__CFITSIO_ffgkyc);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkym", XS_Astro__FITS__CFITSIO_ffgkym);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_key_dblcmp", XS_Astro__FITS__CFITSIO_ffgkym);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_key_dblcmp", XS_Astro__FITS__CFITSIO_ffgkym);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkyn", XS_Astro__FITS__CFITSIO_ffgkyn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_keyn", XS_Astro__FITS__CFITSIO_ffgkyn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_keyn", XS_Astro__FITS__CFITSIO_ffgkyn);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkns", XS_Astro__FITS__CFITSIO_ffgkns);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_keys_str", XS_Astro__FITS__CFITSIO_ffgkns);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_keys_str", XS_Astro__FITS__CFITSIO_ffgkns);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgknl", XS_Astro__FITS__CFITSIO_ffgknl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_keys_log", XS_Astro__FITS__CFITSIO_ffgknl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_keys_log", XS_Astro__FITS__CFITSIO_ffgknl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgknj", XS_Astro__FITS__CFITSIO_ffgknj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_keys_lng", XS_Astro__FITS__CFITSIO_ffgknj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_keys_lng", XS_Astro__FITS__CFITSIO_ffgknj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgknjj", XS_Astro__FITS__CFITSIO_ffgknjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_keys_lnglng", XS_Astro__FITS__CFITSIO_ffgknjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_keys_lnglng", XS_Astro__FITS__CFITSIO_ffgknjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkne", XS_Astro__FITS__CFITSIO_ffgkne);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_keys_flt", XS_Astro__FITS__CFITSIO_ffgkne);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_keys_flt", XS_Astro__FITS__CFITSIO_ffgkne);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgknd", XS_Astro__FITS__CFITSIO_ffgknd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_keys_dbl", XS_Astro__FITS__CFITSIO_ffgknd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_keys_dbl", XS_Astro__FITS__CFITSIO_ffgknd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkey", XS_Astro__FITS__CFITSIO_ffgkey);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_keyword", XS_Astro__FITS__CFITSIO_ffgkey);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_keyword", XS_Astro__FITS__CFITSIO_ffgkey);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgrec", XS_Astro__FITS__CFITSIO_ffgrec);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_record", XS_Astro__FITS__CFITSIO_ffgrec);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_record", XS_Astro__FITS__CFITSIO_ffgrec);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsv", XS_Astro__FITS__CFITSIO_ffgsv);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subset", XS_Astro__FITS__CFITSIO_ffgsv);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subset", XS_Astro__FITS__CFITSIO_ffgsv);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsvb", XS_Astro__FITS__CFITSIO_ffgsvb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subset_byt", XS_Astro__FITS__CFITSIO_ffgsvb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subset_byt", XS_Astro__FITS__CFITSIO_ffgsvb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsvsb", XS_Astro__FITS__CFITSIO_ffgsvsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subset_sbyt", XS_Astro__FITS__CFITSIO_ffgsvsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subset_sbyt", XS_Astro__FITS__CFITSIO_ffgsvsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsvi", XS_Astro__FITS__CFITSIO_ffgsvi);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subset_sht", XS_Astro__FITS__CFITSIO_ffgsvi);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subset_sht", XS_Astro__FITS__CFITSIO_ffgsvi);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsvui", XS_Astro__FITS__CFITSIO_ffgsvui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subset_usht", XS_Astro__FITS__CFITSIO_ffgsvui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subset_usht", XS_Astro__FITS__CFITSIO_ffgsvui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsvk", XS_Astro__FITS__CFITSIO_ffgsvk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subset_int", XS_Astro__FITS__CFITSIO_ffgsvk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subset_int", XS_Astro__FITS__CFITSIO_ffgsvk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsvuk", XS_Astro__FITS__CFITSIO_ffgsvuk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subset_uint", XS_Astro__FITS__CFITSIO_ffgsvuk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subset_uint", XS_Astro__FITS__CFITSIO_ffgsvuk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsvj", XS_Astro__FITS__CFITSIO_ffgsvj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subset_lng", XS_Astro__FITS__CFITSIO_ffgsvj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subset_lng", XS_Astro__FITS__CFITSIO_ffgsvj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsvjj", XS_Astro__FITS__CFITSIO_ffgsvjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subset_lnglng", XS_Astro__FITS__CFITSIO_ffgsvjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subset_lnglng", XS_Astro__FITS__CFITSIO_ffgsvjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsvuj", XS_Astro__FITS__CFITSIO_ffgsvuj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subset_ulng", XS_Astro__FITS__CFITSIO_ffgsvuj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subset_ulng", XS_Astro__FITS__CFITSIO_ffgsvuj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsve", XS_Astro__FITS__CFITSIO_ffgsve);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subset_flt", XS_Astro__FITS__CFITSIO_ffgsve);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subset_flt", XS_Astro__FITS__CFITSIO_ffgsve);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsvd", XS_Astro__FITS__CFITSIO_ffgsvd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subset_dbl", XS_Astro__FITS__CFITSIO_ffgsvd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subset_dbl", XS_Astro__FITS__CFITSIO_ffgsvd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsfb", XS_Astro__FITS__CFITSIO_ffgsfb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subsetnull_byt", XS_Astro__FITS__CFITSIO_ffgsfb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subsetnull_byt", XS_Astro__FITS__CFITSIO_ffgsfb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsfsb", XS_Astro__FITS__CFITSIO_ffgsfsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subsetnull_sbyt", XS_Astro__FITS__CFITSIO_ffgsfsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subsetnull_sbyt", XS_Astro__FITS__CFITSIO_ffgsfsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsfi", XS_Astro__FITS__CFITSIO_ffgsfi);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subsetnull_sht", XS_Astro__FITS__CFITSIO_ffgsfi);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subsetnull_sht", XS_Astro__FITS__CFITSIO_ffgsfi);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsfui", XS_Astro__FITS__CFITSIO_ffgsfui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subsetnull_usht", XS_Astro__FITS__CFITSIO_ffgsfui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subsetnull_usht", XS_Astro__FITS__CFITSIO_ffgsfui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsfk", XS_Astro__FITS__CFITSIO_ffgsfk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subsetnull_int", XS_Astro__FITS__CFITSIO_ffgsfk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subsetnull_int", XS_Astro__FITS__CFITSIO_ffgsfk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsfuk", XS_Astro__FITS__CFITSIO_ffgsfuk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subsetnull_uint", XS_Astro__FITS__CFITSIO_ffgsfuk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subsetnull_uint", XS_Astro__FITS__CFITSIO_ffgsfuk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsfj", XS_Astro__FITS__CFITSIO_ffgsfj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subsetnull_lng", XS_Astro__FITS__CFITSIO_ffgsfj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subsetnull_lng", XS_Astro__FITS__CFITSIO_ffgsfj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsfjj", XS_Astro__FITS__CFITSIO_ffgsfjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subsetnull_lnglng", XS_Astro__FITS__CFITSIO_ffgsfjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subsetnull_lnglng", XS_Astro__FITS__CFITSIO_ffgsfjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsfuj", XS_Astro__FITS__CFITSIO_ffgsfuj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subsetnull_ulng", XS_Astro__FITS__CFITSIO_ffgsfuj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subsetnull_ulng", XS_Astro__FITS__CFITSIO_ffgsfuj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsfe", XS_Astro__FITS__CFITSIO_ffgsfe);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subsetnull_flt", XS_Astro__FITS__CFITSIO_ffgsfe);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subsetnull_flt", XS_Astro__FITS__CFITSIO_ffgsfe);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgsfd", XS_Astro__FITS__CFITSIO_ffgsfd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_subsetnull_dbl", XS_Astro__FITS__CFITSIO_ffgsfd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_subsetnull_dbl", XS_Astro__FITS__CFITSIO_ffgsfd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtcs", XS_Astro__FITS__CFITSIO_ffgtcs);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_tbl_coord", XS_Astro__FITS__CFITSIO_ffgtcs);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_tbl_coord", XS_Astro__FITS__CFITSIO_ffgtcs);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtbb", XS_Astro__FITS__CFITSIO_ffgtbb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_tblbytes", XS_Astro__FITS__CFITSIO_ffgtbb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_tblbytes", XS_Astro__FITS__CFITSIO_ffgtbb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtdm", XS_Astro__FITS__CFITSIO_ffgtdm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_tdim", XS_Astro__FITS__CFITSIO_ffgtdm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_tdim", XS_Astro__FITS__CFITSIO_ffgtdm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtdmll", XS_Astro__FITS__CFITSIO_ffgtdmll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_tdimll", XS_Astro__FITS__CFITSIO_ffgtdmll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_tdimll", XS_Astro__FITS__CFITSIO_ffgtdmll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtrm", XS_Astro__FITS__CFITSIO_ffgtrm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_remove_group", XS_Astro__FITS__CFITSIO_ffgtrm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::remove_group", XS_Astro__FITS__CFITSIO_ffgtrm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgmrm", XS_Astro__FITS__CFITSIO_ffgmrm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_remove_member", XS_Astro__FITS__CFITSIO_ffgmrm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::remove_member", XS_Astro__FITS__CFITSIO_ffgmrm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffreopen", XS_Astro__FITS__CFITSIO_ffreopen);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_reopen_file", XS_Astro__FITS__CFITSIO_ffreopen);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::reopen_file", XS_Astro__FITS__CFITSIO_ffreopen);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffrprt", XS_Astro__FITS__CFITSIO_ffrprt);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_report_error", XS_Astro__FITS__CFITSIO_ffrprt);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffrsim", XS_Astro__FITS__CFITSIO_ffrsim);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_resize_img", XS_Astro__FITS__CFITSIO_ffrsim);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::resize_img", XS_Astro__FITS__CFITSIO_ffrsim);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffrsimll", XS_Astro__FITS__CFITSIO_ffrsimll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_resize_imgll", XS_Astro__FITS__CFITSIO_ffrsimll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::resize_imgll", XS_Astro__FITS__CFITSIO_ffrsimll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffsrow", XS_Astro__FITS__CFITSIO_ffsrow);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_select_rows", XS_Astro__FITS__CFITSIO_ffsrow);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::select_rows", XS_Astro__FITS__CFITSIO_ffsrow);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpscl", XS_Astro__FITS__CFITSIO_ffpscl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_set_bscale", XS_Astro__FITS__CFITSIO_ffpscl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::set_bscale", XS_Astro__FITS__CFITSIO_ffpscl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffsnul", XS_Astro__FITS__CFITSIO_ffsnul);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_set_atblnull", XS_Astro__FITS__CFITSIO_ffsnul);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::set_atblnull", XS_Astro__FITS__CFITSIO_ffsnul);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fftnul", XS_Astro__FITS__CFITSIO_fftnul);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_set_btblnull", XS_Astro__FITS__CFITSIO_fftnul);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::set_btblnull", XS_Astro__FITS__CFITSIO_fftnul);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_set_compression_type", XS_Astro__FITS__CFITSIO_fits_set_compression_type);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("fitsfilePtr::set_compression_type", XS_Astro__FITS__CFITSIO_fits_set_compression_type);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffhdef", XS_Astro__FITS__CFITSIO_ffhdef);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_set_hdrsize", XS_Astro__FITS__CFITSIO_ffhdef);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::set_hdrsize", XS_Astro__FITS__CFITSIO_ffhdef);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffrdef", XS_Astro__FITS__CFITSIO_ffrdef);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_set_hdustruc", XS_Astro__FITS__CFITSIO_ffrdef);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::set_hdustruc", XS_Astro__FITS__CFITSIO_ffrdef);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpnul", XS_Astro__FITS__CFITSIO_ffpnul);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_set_imgnull", XS_Astro__FITS__CFITSIO_ffpnul);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::set_imgnull", XS_Astro__FITS__CFITSIO_ffpnul);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_set_noise_bits", XS_Astro__FITS__CFITSIO_fits_set_noise_bits);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("fitsfilePtr::set_noise_bits", XS_Astro__FITS__CFITSIO_fits_set_noise_bits);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_set_tile_dim", XS_Astro__FITS__CFITSIO_fits_set_tile_dim);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("fitsfilePtr::set_tile_dim", XS_Astro__FITS__CFITSIO_fits_set_tile_dim);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fftscl", XS_Astro__FITS__CFITSIO_fftscl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_set_tscale", XS_Astro__FITS__CFITSIO_fftscl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::set_tscale", XS_Astro__FITS__CFITSIO_fftscl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffs2dt", XS_Astro__FITS__CFITSIO_ffs2dt);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_str2date", XS_Astro__FITS__CFITSIO_ffs2dt);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffs2tm", XS_Astro__FITS__CFITSIO_ffs2tm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_str2time", XS_Astro__FITS__CFITSIO_ffs2tm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fftexp", XS_Astro__FITS__CFITSIO_fftexp);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_test_expr", XS_Astro__FITS__CFITSIO_fftexp);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::test_expr", XS_Astro__FITS__CFITSIO_fftexp);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fftheap", XS_Astro__FITS__CFITSIO_fftheap);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_test_heap", XS_Astro__FITS__CFITSIO_fftheap);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::test_heap", XS_Astro__FITS__CFITSIO_fftheap);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fftkey", XS_Astro__FITS__CFITSIO_fftkey);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_test_keyword", XS_Astro__FITS__CFITSIO_fftkey);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fftrec", XS_Astro__FITS__CFITSIO_fftrec);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_test_record", XS_Astro__FITS__CFITSIO_fftrec);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fftm2s", XS_Astro__FITS__CFITSIO_fftm2s);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_time2str", XS_Astro__FITS__CFITSIO_fftm2s);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgmtf", XS_Astro__FITS__CFITSIO_ffgmtf);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_transfer_member", XS_Astro__FITS__CFITSIO_ffgmtf);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::transfer_member", XS_Astro__FITS__CFITSIO_ffgmtf);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffucrd", XS_Astro__FITS__CFITSIO_ffucrd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_card", XS_Astro__FITS__CFITSIO_ffucrd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_card", XS_Astro__FITS__CFITSIO_ffucrd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffupck", XS_Astro__FITS__CFITSIO_ffupck);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_chksum", XS_Astro__FITS__CFITSIO_ffupck);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_chksum", XS_Astro__FITS__CFITSIO_ffupck);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffuky", XS_Astro__FITS__CFITSIO_ffuky);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_key", XS_Astro__FITS__CFITSIO_ffuky);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_key", XS_Astro__FITS__CFITSIO_ffuky);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffukyu", XS_Astro__FITS__CFITSIO_ffukyu);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_key_null", XS_Astro__FITS__CFITSIO_ffukyu);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_key_null", XS_Astro__FITS__CFITSIO_ffukyu);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffukys", XS_Astro__FITS__CFITSIO_ffukys);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_key_str", XS_Astro__FITS__CFITSIO_ffukys);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_key_str", XS_Astro__FITS__CFITSIO_ffukys);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffukyl", XS_Astro__FITS__CFITSIO_ffukyl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_key_log", XS_Astro__FITS__CFITSIO_ffukyl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_key_log", XS_Astro__FITS__CFITSIO_ffukyl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffukyj", XS_Astro__FITS__CFITSIO_ffukyj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_key_lng", XS_Astro__FITS__CFITSIO_ffukyj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_key_lng", XS_Astro__FITS__CFITSIO_ffukyj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffukye", XS_Astro__FITS__CFITSIO_ffukye);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_key_flt", XS_Astro__FITS__CFITSIO_ffukye);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_key_flt", XS_Astro__FITS__CFITSIO_ffukye);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffukyd", XS_Astro__FITS__CFITSIO_ffukyd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_key_dbl", XS_Astro__FITS__CFITSIO_ffukyd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_key_dbl", XS_Astro__FITS__CFITSIO_ffukyd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffukyf", XS_Astro__FITS__CFITSIO_ffukyf);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_key_fixflt", XS_Astro__FITS__CFITSIO_ffukyf);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_key_fixflt", XS_Astro__FITS__CFITSIO_ffukyf);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffukyg", XS_Astro__FITS__CFITSIO_ffukyg);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_key_fixdbl", XS_Astro__FITS__CFITSIO_ffukyg);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_key_fixdbl", XS_Astro__FITS__CFITSIO_ffukyg);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffukyc", XS_Astro__FITS__CFITSIO_ffukyc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_key_cmp", XS_Astro__FITS__CFITSIO_ffukyc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_key_cmp", XS_Astro__FITS__CFITSIO_ffukyc);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffukym", XS_Astro__FITS__CFITSIO_ffukym);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_key_dblcmp", XS_Astro__FITS__CFITSIO_ffukym);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_key_dblcmp", XS_Astro__FITS__CFITSIO_ffukym);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffukfc", XS_Astro__FITS__CFITSIO_ffukfc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_key_fixcmp", XS_Astro__FITS__CFITSIO_ffukfc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_key_fixcmp", XS_Astro__FITS__CFITSIO_ffukfc);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffukfm", XS_Astro__FITS__CFITSIO_ffukfm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_key_fixdblcmp", XS_Astro__FITS__CFITSIO_ffukfm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_key_fixdblcmp", XS_Astro__FITS__CFITSIO_ffukfm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffupch", XS_Astro__FITS__CFITSIO_ffupch);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_uppercase", XS_Astro__FITS__CFITSIO_ffupch);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffurlt", XS_Astro__FITS__CFITSIO_ffurlt);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_url_type", XS_Astro__FITS__CFITSIO_ffurlt);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::url_type", XS_Astro__FITS__CFITSIO_ffurlt);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffvcks", XS_Astro__FITS__CFITSIO_ffvcks);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_verify_chksum", XS_Astro__FITS__CFITSIO_ffvcks);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::verify_chksum", XS_Astro__FITS__CFITSIO_ffvcks);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtvf", XS_Astro__FITS__CFITSIO_ffgtvf);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_verify_group", XS_Astro__FITS__CFITSIO_ffgtvf);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::verify_group", XS_Astro__FITS__CFITSIO_ffgtvf);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffxypx", XS_Astro__FITS__CFITSIO_ffxypx);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_world_to_pix", XS_Astro__FITS__CFITSIO_ffxypx);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp2db", XS_Astro__FITS__CFITSIO_ffp2db);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_2d_byt", XS_Astro__FITS__CFITSIO_ffp2db);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_2d_byt", XS_Astro__FITS__CFITSIO_ffp2db);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp2dsb", XS_Astro__FITS__CFITSIO_ffp2dsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_2d_sbyt", XS_Astro__FITS__CFITSIO_ffp2dsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_2d_sbyt", XS_Astro__FITS__CFITSIO_ffp2dsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp2di", XS_Astro__FITS__CFITSIO_ffp2di);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_2d_sht", XS_Astro__FITS__CFITSIO_ffp2di);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_2d_sht", XS_Astro__FITS__CFITSIO_ffp2di);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp2dui", XS_Astro__FITS__CFITSIO_ffp2dui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_2d_usht", XS_Astro__FITS__CFITSIO_ffp2dui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_2d_usht", XS_Astro__FITS__CFITSIO_ffp2dui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp2dk", XS_Astro__FITS__CFITSIO_ffp2dk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_2d_int", XS_Astro__FITS__CFITSIO_ffp2dk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_2d_int", XS_Astro__FITS__CFITSIO_ffp2dk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp2duk", XS_Astro__FITS__CFITSIO_ffp2duk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_2d_uint", XS_Astro__FITS__CFITSIO_ffp2duk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_2d_uint", XS_Astro__FITS__CFITSIO_ffp2duk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp2dj", XS_Astro__FITS__CFITSIO_ffp2dj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_2d_lng", XS_Astro__FITS__CFITSIO_ffp2dj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_2d_lng", XS_Astro__FITS__CFITSIO_ffp2dj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp2djj", XS_Astro__FITS__CFITSIO_ffp2djj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_2d_lnglng", XS_Astro__FITS__CFITSIO_ffp2djj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_2d_lnglng", XS_Astro__FITS__CFITSIO_ffp2djj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp2duj", XS_Astro__FITS__CFITSIO_ffp2duj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_2d_ulng", XS_Astro__FITS__CFITSIO_ffp2duj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_2d_ulng", XS_Astro__FITS__CFITSIO_ffp2duj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp2de", XS_Astro__FITS__CFITSIO_ffp2de);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_2d_flt", XS_Astro__FITS__CFITSIO_ffp2de);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_2d_flt", XS_Astro__FITS__CFITSIO_ffp2de);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp2dd", XS_Astro__FITS__CFITSIO_ffp2dd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_2d_dbl", XS_Astro__FITS__CFITSIO_ffp2dd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_2d_dbl", XS_Astro__FITS__CFITSIO_ffp2dd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp3db", XS_Astro__FITS__CFITSIO_ffp3db);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_3d_byt", XS_Astro__FITS__CFITSIO_ffp3db);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_3d_byt", XS_Astro__FITS__CFITSIO_ffp3db);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp3dsb", XS_Astro__FITS__CFITSIO_ffp3dsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_3d_sbyt", XS_Astro__FITS__CFITSIO_ffp3dsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_3d_sbyt", XS_Astro__FITS__CFITSIO_ffp3dsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp3di", XS_Astro__FITS__CFITSIO_ffp3di);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_3d_sht", XS_Astro__FITS__CFITSIO_ffp3di);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_3d_sht", XS_Astro__FITS__CFITSIO_ffp3di);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp3dui", XS_Astro__FITS__CFITSIO_ffp3dui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_3d_usht", XS_Astro__FITS__CFITSIO_ffp3dui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_3d_usht", XS_Astro__FITS__CFITSIO_ffp3dui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp3dk", XS_Astro__FITS__CFITSIO_ffp3dk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_3d_int", XS_Astro__FITS__CFITSIO_ffp3dk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_3d_int", XS_Astro__FITS__CFITSIO_ffp3dk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp3duk", XS_Astro__FITS__CFITSIO_ffp3duk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_3d_uint", XS_Astro__FITS__CFITSIO_ffp3duk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_3d_uint", XS_Astro__FITS__CFITSIO_ffp3duk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp3dj", XS_Astro__FITS__CFITSIO_ffp3dj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_3d_lng", XS_Astro__FITS__CFITSIO_ffp3dj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_3d_lng", XS_Astro__FITS__CFITSIO_ffp3dj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp3djj", XS_Astro__FITS__CFITSIO_ffp3djj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_3d_lnglng", XS_Astro__FITS__CFITSIO_ffp3djj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_3d_lnglng", XS_Astro__FITS__CFITSIO_ffp3djj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp3duj", XS_Astro__FITS__CFITSIO_ffp3duj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_3d_ulng", XS_Astro__FITS__CFITSIO_ffp3duj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_3d_ulng", XS_Astro__FITS__CFITSIO_ffp3duj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp3de", XS_Astro__FITS__CFITSIO_ffp3de);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_3d_flt", XS_Astro__FITS__CFITSIO_ffp3de);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_3d_flt", XS_Astro__FITS__CFITSIO_ffp3de);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffp3dd", XS_Astro__FITS__CFITSIO_ffp3dd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_3d_dbl", XS_Astro__FITS__CFITSIO_ffp3dd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_3d_dbl", XS_Astro__FITS__CFITSIO_ffp3dd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffphtb", XS_Astro__FITS__CFITSIO_ffphtb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_atblhdr", XS_Astro__FITS__CFITSIO_ffphtb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_atblhdr", XS_Astro__FITS__CFITSIO_ffphtb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffphbn", XS_Astro__FITS__CFITSIO_ffphbn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_btblhdr", XS_Astro__FITS__CFITSIO_ffphbn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_btblhdr", XS_Astro__FITS__CFITSIO_ffphbn);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffphext", XS_Astro__FITS__CFITSIO_ffphext);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_exthdr", XS_Astro__FITS__CFITSIO_ffphext);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_exthdr", XS_Astro__FITS__CFITSIO_ffphext);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcks", XS_Astro__FITS__CFITSIO_ffpcks);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_chksum", XS_Astro__FITS__CFITSIO_ffpcks);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_chksum", XS_Astro__FITS__CFITSIO_ffpcks);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffprwu", XS_Astro__FITS__CFITSIO_ffprwu);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_nullrows", XS_Astro__FITS__CFITSIO_ffprwu);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_nullrows", XS_Astro__FITS__CFITSIO_ffprwu);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpclu", XS_Astro__FITS__CFITSIO_ffpclu);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_null", XS_Astro__FITS__CFITSIO_ffpclu);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_null", XS_Astro__FITS__CFITSIO_ffpclu);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcl", XS_Astro__FITS__CFITSIO_ffpcl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col", XS_Astro__FITS__CFITSIO_ffpcl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col", XS_Astro__FITS__CFITSIO_ffpcl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpclx", XS_Astro__FITS__CFITSIO_ffpclx);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_bit", XS_Astro__FITS__CFITSIO_ffpclx);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_bit", XS_Astro__FITS__CFITSIO_ffpclx);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcls", XS_Astro__FITS__CFITSIO_ffpcls);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_str", XS_Astro__FITS__CFITSIO_ffpcls);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_str", XS_Astro__FITS__CFITSIO_ffpcls);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcll", XS_Astro__FITS__CFITSIO_ffpcll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_log", XS_Astro__FITS__CFITSIO_ffpcll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_log", XS_Astro__FITS__CFITSIO_ffpcll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpclb", XS_Astro__FITS__CFITSIO_ffpclb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_byt", XS_Astro__FITS__CFITSIO_ffpclb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_byt", XS_Astro__FITS__CFITSIO_ffpclb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpclsb", XS_Astro__FITS__CFITSIO_ffpclsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_sbyt", XS_Astro__FITS__CFITSIO_ffpclsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_sbyt", XS_Astro__FITS__CFITSIO_ffpclsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpclui", XS_Astro__FITS__CFITSIO_ffpclui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_usht", XS_Astro__FITS__CFITSIO_ffpclui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_usht", XS_Astro__FITS__CFITSIO_ffpclui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcli", XS_Astro__FITS__CFITSIO_ffpcli);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_sht", XS_Astro__FITS__CFITSIO_ffpcli);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_sht", XS_Astro__FITS__CFITSIO_ffpcli);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcluk", XS_Astro__FITS__CFITSIO_ffpcluk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_uint", XS_Astro__FITS__CFITSIO_ffpcluk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_uint", XS_Astro__FITS__CFITSIO_ffpcluk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpclk", XS_Astro__FITS__CFITSIO_ffpclk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_int", XS_Astro__FITS__CFITSIO_ffpclk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_int", XS_Astro__FITS__CFITSIO_ffpclk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcluj", XS_Astro__FITS__CFITSIO_ffpcluj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_ulng", XS_Astro__FITS__CFITSIO_ffpcluj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_ulng", XS_Astro__FITS__CFITSIO_ffpcluj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpclj", XS_Astro__FITS__CFITSIO_ffpclj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_lng", XS_Astro__FITS__CFITSIO_ffpclj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_lng", XS_Astro__FITS__CFITSIO_ffpclj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcljj", XS_Astro__FITS__CFITSIO_ffpcljj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_lnglng", XS_Astro__FITS__CFITSIO_ffpcljj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_lnglng", XS_Astro__FITS__CFITSIO_ffpcljj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcle", XS_Astro__FITS__CFITSIO_ffpcle);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_flt", XS_Astro__FITS__CFITSIO_ffpcle);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_flt", XS_Astro__FITS__CFITSIO_ffpcle);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcld", XS_Astro__FITS__CFITSIO_ffpcld);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_dbl", XS_Astro__FITS__CFITSIO_ffpcld);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_dbl", XS_Astro__FITS__CFITSIO_ffpcld);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpclc", XS_Astro__FITS__CFITSIO_ffpclc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_cmp", XS_Astro__FITS__CFITSIO_ffpclc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_cmp", XS_Astro__FITS__CFITSIO_ffpclc);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpclm", XS_Astro__FITS__CFITSIO_ffpclm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_col_dblcmp", XS_Astro__FITS__CFITSIO_ffpclm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_col_dblcmp", XS_Astro__FITS__CFITSIO_ffpclm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcn", XS_Astro__FITS__CFITSIO_ffpcn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_colnull", XS_Astro__FITS__CFITSIO_ffpcn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_colnull", XS_Astro__FITS__CFITSIO_ffpcn);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcns", XS_Astro__FITS__CFITSIO_ffpcns);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_colnull_str", XS_Astro__FITS__CFITSIO_ffpcns);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_colnull_str", XS_Astro__FITS__CFITSIO_ffpcns);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcnl", XS_Astro__FITS__CFITSIO_ffpcnl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_colnull_log", XS_Astro__FITS__CFITSIO_ffpcnl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_colnull_log", XS_Astro__FITS__CFITSIO_ffpcnl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcnb", XS_Astro__FITS__CFITSIO_ffpcnb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_colnull_byt", XS_Astro__FITS__CFITSIO_ffpcnb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_colnull_byt", XS_Astro__FITS__CFITSIO_ffpcnb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcnsb", XS_Astro__FITS__CFITSIO_ffpcnsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_colnull_sbyt", XS_Astro__FITS__CFITSIO_ffpcnsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_colnull_sbyt", XS_Astro__FITS__CFITSIO_ffpcnsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcnui", XS_Astro__FITS__CFITSIO_ffpcnui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_colnull_usht", XS_Astro__FITS__CFITSIO_ffpcnui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_colnull_usht", XS_Astro__FITS__CFITSIO_ffpcnui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcni", XS_Astro__FITS__CFITSIO_ffpcni);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_colnull_sht", XS_Astro__FITS__CFITSIO_ffpcni);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_colnull_sht", XS_Astro__FITS__CFITSIO_ffpcni);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcnuk", XS_Astro__FITS__CFITSIO_ffpcnuk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_colnull_uint", XS_Astro__FITS__CFITSIO_ffpcnuk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_colnull_uint", XS_Astro__FITS__CFITSIO_ffpcnuk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcnk", XS_Astro__FITS__CFITSIO_ffpcnk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_colnull_int", XS_Astro__FITS__CFITSIO_ffpcnk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_colnull_int", XS_Astro__FITS__CFITSIO_ffpcnk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcnuj", XS_Astro__FITS__CFITSIO_ffpcnuj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_colnull_ulng", XS_Astro__FITS__CFITSIO_ffpcnuj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_colnull_ulng", XS_Astro__FITS__CFITSIO_ffpcnuj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcnj", XS_Astro__FITS__CFITSIO_ffpcnj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_colnull_lng", XS_Astro__FITS__CFITSIO_ffpcnj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_colnull_lng", XS_Astro__FITS__CFITSIO_ffpcnj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcnjj", XS_Astro__FITS__CFITSIO_ffpcnjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_colnull_lnglng", XS_Astro__FITS__CFITSIO_ffpcnjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_colnull_lnglng", XS_Astro__FITS__CFITSIO_ffpcnjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcne", XS_Astro__FITS__CFITSIO_ffpcne);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_colnull_flt", XS_Astro__FITS__CFITSIO_ffpcne);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_colnull_flt", XS_Astro__FITS__CFITSIO_ffpcne);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcnd", XS_Astro__FITS__CFITSIO_ffpcnd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_colnull_dbl", XS_Astro__FITS__CFITSIO_ffpcnd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_colnull_dbl", XS_Astro__FITS__CFITSIO_ffpcnd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpcom", XS_Astro__FITS__CFITSIO_ffpcom);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_comment", XS_Astro__FITS__CFITSIO_ffpcom);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_comment", XS_Astro__FITS__CFITSIO_ffpcom);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpdat", XS_Astro__FITS__CFITSIO_ffpdat);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_date", XS_Astro__FITS__CFITSIO_ffpdat);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_date", XS_Astro__FITS__CFITSIO_ffpdat);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpdes", XS_Astro__FITS__CFITSIO_ffpdes);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_descript", XS_Astro__FITS__CFITSIO_ffpdes);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_descript", XS_Astro__FITS__CFITSIO_ffpdes);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpmsg", XS_Astro__FITS__CFITSIO_ffpmsg);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_errmsg", XS_Astro__FITS__CFITSIO_ffpmsg);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpgpb", XS_Astro__FITS__CFITSIO_ffpgpb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_grppar_byt", XS_Astro__FITS__CFITSIO_ffpgpb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_grppar_byt", XS_Astro__FITS__CFITSIO_ffpgpb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpgpsb", XS_Astro__FITS__CFITSIO_ffpgpsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_grppar_sbyt", XS_Astro__FITS__CFITSIO_ffpgpsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_grppar_sbyt", XS_Astro__FITS__CFITSIO_ffpgpsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpgpui", XS_Astro__FITS__CFITSIO_ffpgpui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_grppar_usht", XS_Astro__FITS__CFITSIO_ffpgpui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_grppar_usht", XS_Astro__FITS__CFITSIO_ffpgpui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpgpi", XS_Astro__FITS__CFITSIO_ffpgpi);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_grppar_sht", XS_Astro__FITS__CFITSIO_ffpgpi);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_grppar_sht", XS_Astro__FITS__CFITSIO_ffpgpi);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpgpuk", XS_Astro__FITS__CFITSIO_ffpgpuk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_grppar_uint", XS_Astro__FITS__CFITSIO_ffpgpuk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_grppar_uint", XS_Astro__FITS__CFITSIO_ffpgpuk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpgpk", XS_Astro__FITS__CFITSIO_ffpgpk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_grppar_int", XS_Astro__FITS__CFITSIO_ffpgpk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_grppar_int", XS_Astro__FITS__CFITSIO_ffpgpk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpgpuj", XS_Astro__FITS__CFITSIO_ffpgpuj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_grppar_ulng", XS_Astro__FITS__CFITSIO_ffpgpuj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_grppar_ulng", XS_Astro__FITS__CFITSIO_ffpgpuj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpgpj", XS_Astro__FITS__CFITSIO_ffpgpj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_grppar_lng", XS_Astro__FITS__CFITSIO_ffpgpj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_grppar_lng", XS_Astro__FITS__CFITSIO_ffpgpj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpgpjj", XS_Astro__FITS__CFITSIO_ffpgpjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_grppar_lnglng", XS_Astro__FITS__CFITSIO_ffpgpjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_grppar_lnglng", XS_Astro__FITS__CFITSIO_ffpgpjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpgpe", XS_Astro__FITS__CFITSIO_ffpgpe);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_grppar_flt", XS_Astro__FITS__CFITSIO_ffpgpe);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_grppar_flt", XS_Astro__FITS__CFITSIO_ffpgpe);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpgpd", XS_Astro__FITS__CFITSIO_ffpgpd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_grppar_dbl", XS_Astro__FITS__CFITSIO_ffpgpd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_grppar_dbl", XS_Astro__FITS__CFITSIO_ffpgpd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffphis", XS_Astro__FITS__CFITSIO_ffphis);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_history", XS_Astro__FITS__CFITSIO_ffphis);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_history", XS_Astro__FITS__CFITSIO_ffphis);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppr", XS_Astro__FITS__CFITSIO_ffppr);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_img", XS_Astro__FITS__CFITSIO_ffppr);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_img", XS_Astro__FITS__CFITSIO_ffppr);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppru", XS_Astro__FITS__CFITSIO_ffppru);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_img_null", XS_Astro__FITS__CFITSIO_ffppru);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_img_null", XS_Astro__FITS__CFITSIO_ffppru);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpprb", XS_Astro__FITS__CFITSIO_ffpprb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_img_byt", XS_Astro__FITS__CFITSIO_ffpprb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_img_byt", XS_Astro__FITS__CFITSIO_ffpprb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpprsb", XS_Astro__FITS__CFITSIO_ffpprsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_img_sbyt", XS_Astro__FITS__CFITSIO_ffpprsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_img_sbyt", XS_Astro__FITS__CFITSIO_ffpprsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpprui", XS_Astro__FITS__CFITSIO_ffpprui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_img_usht", XS_Astro__FITS__CFITSIO_ffpprui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_img_usht", XS_Astro__FITS__CFITSIO_ffpprui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppri", XS_Astro__FITS__CFITSIO_ffppri);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_img_sht", XS_Astro__FITS__CFITSIO_ffppri);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_img_sht", XS_Astro__FITS__CFITSIO_ffppri);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppruk", XS_Astro__FITS__CFITSIO_ffppruk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_img_uint", XS_Astro__FITS__CFITSIO_ffppruk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_img_uint", XS_Astro__FITS__CFITSIO_ffppruk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpprk", XS_Astro__FITS__CFITSIO_ffpprk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_img_int", XS_Astro__FITS__CFITSIO_ffpprk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_img_int", XS_Astro__FITS__CFITSIO_ffpprk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppruj", XS_Astro__FITS__CFITSIO_ffppruj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_img_ulng", XS_Astro__FITS__CFITSIO_ffppruj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_img_ulng", XS_Astro__FITS__CFITSIO_ffppruj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpprj", XS_Astro__FITS__CFITSIO_ffpprj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_img_lng", XS_Astro__FITS__CFITSIO_ffpprj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_img_lng", XS_Astro__FITS__CFITSIO_ffpprj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpprjj", XS_Astro__FITS__CFITSIO_ffpprjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_img_lnglng", XS_Astro__FITS__CFITSIO_ffpprjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_img_lnglng", XS_Astro__FITS__CFITSIO_ffpprjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppre", XS_Astro__FITS__CFITSIO_ffppre);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_img_flt", XS_Astro__FITS__CFITSIO_ffppre);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_img_flt", XS_Astro__FITS__CFITSIO_ffppre);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpprd", XS_Astro__FITS__CFITSIO_ffpprd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_img_dbl", XS_Astro__FITS__CFITSIO_ffpprd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_img_dbl", XS_Astro__FITS__CFITSIO_ffpprd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffphps", XS_Astro__FITS__CFITSIO_ffphps);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_imghdr", XS_Astro__FITS__CFITSIO_ffphps);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_imghdr", XS_Astro__FITS__CFITSIO_ffphps);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffphpsll", XS_Astro__FITS__CFITSIO_ffphpsll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_imghdrll", XS_Astro__FITS__CFITSIO_ffphpsll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_imghdrll", XS_Astro__FITS__CFITSIO_ffphpsll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffphpr", XS_Astro__FITS__CFITSIO_ffphpr);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_grphdr", XS_Astro__FITS__CFITSIO_ffphpr);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_grphdr", XS_Astro__FITS__CFITSIO_ffphpr);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffphprll", XS_Astro__FITS__CFITSIO_ffphprll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_grphdrll", XS_Astro__FITS__CFITSIO_ffphprll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_grphdrll", XS_Astro__FITS__CFITSIO_ffphprll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppn", XS_Astro__FITS__CFITSIO_ffppn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_imgnull", XS_Astro__FITS__CFITSIO_ffppn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_imgnull", XS_Astro__FITS__CFITSIO_ffppn);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppnb", XS_Astro__FITS__CFITSIO_ffppnb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_imgnull_byt", XS_Astro__FITS__CFITSIO_ffppnb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_imgnull_byt", XS_Astro__FITS__CFITSIO_ffppnb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppnsb", XS_Astro__FITS__CFITSIO_ffppnsb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_imgnull_sbyt", XS_Astro__FITS__CFITSIO_ffppnsb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_imgnull_sbyt", XS_Astro__FITS__CFITSIO_ffppnsb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppnui", XS_Astro__FITS__CFITSIO_ffppnui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_imgnull_usht", XS_Astro__FITS__CFITSIO_ffppnui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_imgnull_usht", XS_Astro__FITS__CFITSIO_ffppnui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppni", XS_Astro__FITS__CFITSIO_ffppni);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_imgnull_sht", XS_Astro__FITS__CFITSIO_ffppni);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_imgnull_sht", XS_Astro__FITS__CFITSIO_ffppni);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppnuk", XS_Astro__FITS__CFITSIO_ffppnuk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_imgnull_uint", XS_Astro__FITS__CFITSIO_ffppnuk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_imgnull_uint", XS_Astro__FITS__CFITSIO_ffppnuk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppnk", XS_Astro__FITS__CFITSIO_ffppnk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_imgnull_int", XS_Astro__FITS__CFITSIO_ffppnk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_imgnull_int", XS_Astro__FITS__CFITSIO_ffppnk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppnuj", XS_Astro__FITS__CFITSIO_ffppnuj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_imgnull_ulng", XS_Astro__FITS__CFITSIO_ffppnuj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_imgnull_ulng", XS_Astro__FITS__CFITSIO_ffppnuj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppnj", XS_Astro__FITS__CFITSIO_ffppnj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_imgnull_lng", XS_Astro__FITS__CFITSIO_ffppnj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_imgnull_lng", XS_Astro__FITS__CFITSIO_ffppnj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppnjj", XS_Astro__FITS__CFITSIO_ffppnjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_imgnull_lnglng", XS_Astro__FITS__CFITSIO_ffppnjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_imgnull_lnglng", XS_Astro__FITS__CFITSIO_ffppnjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppne", XS_Astro__FITS__CFITSIO_ffppne);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_imgnull_flt", XS_Astro__FITS__CFITSIO_ffppne);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_imgnull_flt", XS_Astro__FITS__CFITSIO_ffppne);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppnd", XS_Astro__FITS__CFITSIO_ffppnd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_imgnull_dbl", XS_Astro__FITS__CFITSIO_ffppnd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_imgnull_dbl", XS_Astro__FITS__CFITSIO_ffppnd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpky", XS_Astro__FITS__CFITSIO_ffpky);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key", XS_Astro__FITS__CFITSIO_ffpky);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key", XS_Astro__FITS__CFITSIO_ffpky);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkls", XS_Astro__FITS__CFITSIO_ffpkls);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_longstr", XS_Astro__FITS__CFITSIO_ffpkls);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_longstr", XS_Astro__FITS__CFITSIO_ffpkls);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffukls", XS_Astro__FITS__CFITSIO_ffukls);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_update_key_longstr", XS_Astro__FITS__CFITSIO_ffukls);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::update_key_longstr", XS_Astro__FITS__CFITSIO_ffukls);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffikls", XS_Astro__FITS__CFITSIO_ffikls);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_insert_key_longstr", XS_Astro__FITS__CFITSIO_ffikls);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::insert_key_longstr", XS_Astro__FITS__CFITSIO_ffikls);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffmkls", XS_Astro__FITS__CFITSIO_ffmkls);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_modify_key_longstr", XS_Astro__FITS__CFITSIO_ffmkls);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::modify_key_longstr", XS_Astro__FITS__CFITSIO_ffmkls);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffplsw", XS_Astro__FITS__CFITSIO_ffplsw);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_longwarn", XS_Astro__FITS__CFITSIO_ffplsw);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_longwarn", XS_Astro__FITS__CFITSIO_ffplsw);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkyu", XS_Astro__FITS__CFITSIO_ffpkyu);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_null", XS_Astro__FITS__CFITSIO_ffpkyu);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_null", XS_Astro__FITS__CFITSIO_ffpkyu);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpktp", XS_Astro__FITS__CFITSIO_ffpktp);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_template", XS_Astro__FITS__CFITSIO_ffpktp);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_template", XS_Astro__FITS__CFITSIO_ffpktp);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkyt", XS_Astro__FITS__CFITSIO_ffpkyt);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_triple", XS_Astro__FITS__CFITSIO_ffpkyt);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_triple", XS_Astro__FITS__CFITSIO_ffpkyt);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpunt", XS_Astro__FITS__CFITSIO_ffpunt);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_unit", XS_Astro__FITS__CFITSIO_ffpunt);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_unit", XS_Astro__FITS__CFITSIO_ffpunt);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkys", XS_Astro__FITS__CFITSIO_ffpkys);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_str", XS_Astro__FITS__CFITSIO_ffpkys);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_str", XS_Astro__FITS__CFITSIO_ffpkys);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkyl", XS_Astro__FITS__CFITSIO_ffpkyl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_log", XS_Astro__FITS__CFITSIO_ffpkyl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_log", XS_Astro__FITS__CFITSIO_ffpkyl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkyj", XS_Astro__FITS__CFITSIO_ffpkyj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_lng", XS_Astro__FITS__CFITSIO_ffpkyj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_lng", XS_Astro__FITS__CFITSIO_ffpkyj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkye", XS_Astro__FITS__CFITSIO_ffpkye);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_flt", XS_Astro__FITS__CFITSIO_ffpkye);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_flt", XS_Astro__FITS__CFITSIO_ffpkye);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkyf", XS_Astro__FITS__CFITSIO_ffpkyf);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_fixflt", XS_Astro__FITS__CFITSIO_ffpkyf);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_fixflt", XS_Astro__FITS__CFITSIO_ffpkyf);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkyd", XS_Astro__FITS__CFITSIO_ffpkyd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_dbl", XS_Astro__FITS__CFITSIO_ffpkyd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_dbl", XS_Astro__FITS__CFITSIO_ffpkyd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkyg", XS_Astro__FITS__CFITSIO_ffpkyg);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_fixdbl", XS_Astro__FITS__CFITSIO_ffpkyg);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_fixdbl", XS_Astro__FITS__CFITSIO_ffpkyg);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkyc", XS_Astro__FITS__CFITSIO_ffpkyc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_cmp", XS_Astro__FITS__CFITSIO_ffpkyc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_cmp", XS_Astro__FITS__CFITSIO_ffpkyc);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkfc", XS_Astro__FITS__CFITSIO_ffpkfc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_fixcmp", XS_Astro__FITS__CFITSIO_ffpkfc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_fixcmp", XS_Astro__FITS__CFITSIO_ffpkfc);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkym", XS_Astro__FITS__CFITSIO_ffpkym);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_dblcmp", XS_Astro__FITS__CFITSIO_ffpkym);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_dblcmp", XS_Astro__FITS__CFITSIO_ffpkym);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkfm", XS_Astro__FITS__CFITSIO_ffpkfm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_key_fixdblcmp", XS_Astro__FITS__CFITSIO_ffpkfm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_key_fixdblcmp", XS_Astro__FITS__CFITSIO_ffpkfm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkns", XS_Astro__FITS__CFITSIO_ffpkns);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_keys_str", XS_Astro__FITS__CFITSIO_ffpkns);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_keys_str", XS_Astro__FITS__CFITSIO_ffpkns);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpknl", XS_Astro__FITS__CFITSIO_ffpknl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_keys_log", XS_Astro__FITS__CFITSIO_ffpknl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_keys_log", XS_Astro__FITS__CFITSIO_ffpknl);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpknj", XS_Astro__FITS__CFITSIO_ffpknj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_keys_lng", XS_Astro__FITS__CFITSIO_ffpknj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_keys_lng", XS_Astro__FITS__CFITSIO_ffpknj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpknjj", XS_Astro__FITS__CFITSIO_ffpknjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_keys_lnglng", XS_Astro__FITS__CFITSIO_ffpknjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_keysll", XS_Astro__FITS__CFITSIO_ffpknjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkne", XS_Astro__FITS__CFITSIO_ffpkne);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_keys_flt", XS_Astro__FITS__CFITSIO_ffpkne);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_keys_flt", XS_Astro__FITS__CFITSIO_ffpkne);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpknf", XS_Astro__FITS__CFITSIO_ffpknf);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_keys_fixflt", XS_Astro__FITS__CFITSIO_ffpknf);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_keys_fixflt", XS_Astro__FITS__CFITSIO_ffpknf);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpknd", XS_Astro__FITS__CFITSIO_ffpknd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_keys_dbl", XS_Astro__FITS__CFITSIO_ffpknd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_keys_dbl", XS_Astro__FITS__CFITSIO_ffpknd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpkng", XS_Astro__FITS__CFITSIO_ffpkng);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_keys_fixdbl", XS_Astro__FITS__CFITSIO_ffpkng);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_keys_fixdbl", XS_Astro__FITS__CFITSIO_ffpkng);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpprn", XS_Astro__FITS__CFITSIO_ffpprn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_null_img", XS_Astro__FITS__CFITSIO_ffpprn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_null_img", XS_Astro__FITS__CFITSIO_ffpprn);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffprec", XS_Astro__FITS__CFITSIO_ffprec);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_record", XS_Astro__FITS__CFITSIO_ffprec);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_record", XS_Astro__FITS__CFITSIO_ffprec);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpss", XS_Astro__FITS__CFITSIO_ffpss);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_subset", XS_Astro__FITS__CFITSIO_ffpss);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_subset", XS_Astro__FITS__CFITSIO_ffpss);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpssb", XS_Astro__FITS__CFITSIO_ffpssb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_subset_byt", XS_Astro__FITS__CFITSIO_ffpssb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_subset_byt", XS_Astro__FITS__CFITSIO_ffpssb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpsssb", XS_Astro__FITS__CFITSIO_ffpsssb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_subset_sbyt", XS_Astro__FITS__CFITSIO_ffpsssb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_subset_sbyt", XS_Astro__FITS__CFITSIO_ffpsssb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpssui", XS_Astro__FITS__CFITSIO_ffpssui);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_subset_usht", XS_Astro__FITS__CFITSIO_ffpssui);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_subset_usht", XS_Astro__FITS__CFITSIO_ffpssui);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpssi", XS_Astro__FITS__CFITSIO_ffpssi);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_subset_sht", XS_Astro__FITS__CFITSIO_ffpssi);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_subset_sht", XS_Astro__FITS__CFITSIO_ffpssi);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpssuk", XS_Astro__FITS__CFITSIO_ffpssuk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_subset_uint", XS_Astro__FITS__CFITSIO_ffpssuk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_subset_uint", XS_Astro__FITS__CFITSIO_ffpssuk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpssk", XS_Astro__FITS__CFITSIO_ffpssk);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_subset_int", XS_Astro__FITS__CFITSIO_ffpssk);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_subset_int", XS_Astro__FITS__CFITSIO_ffpssk);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpssuj", XS_Astro__FITS__CFITSIO_ffpssuj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_subset_ulng", XS_Astro__FITS__CFITSIO_ffpssuj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_subset_ulng", XS_Astro__FITS__CFITSIO_ffpssuj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpssj", XS_Astro__FITS__CFITSIO_ffpssj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_subset_lng", XS_Astro__FITS__CFITSIO_ffpssj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_subset_lng", XS_Astro__FITS__CFITSIO_ffpssj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpssjj", XS_Astro__FITS__CFITSIO_ffpssjj);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_subset_lnglng", XS_Astro__FITS__CFITSIO_ffpssjj);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_subset_lnglng", XS_Astro__FITS__CFITSIO_ffpssjj);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpsse", XS_Astro__FITS__CFITSIO_ffpsse);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_subset_flt", XS_Astro__FITS__CFITSIO_ffpsse);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_subset_flt", XS_Astro__FITS__CFITSIO_ffpsse);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpssd", XS_Astro__FITS__CFITSIO_ffpssd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_subset_dbl", XS_Astro__FITS__CFITSIO_ffpssd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_subset_dbl", XS_Astro__FITS__CFITSIO_ffpssd);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffptbb", XS_Astro__FITS__CFITSIO_ffptbb);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_tblbytes", XS_Astro__FITS__CFITSIO_ffptbb);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_tblbytes", XS_Astro__FITS__CFITSIO_ffptbb);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffptdm", XS_Astro__FITS__CFITSIO_ffptdm);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_tdim", XS_Astro__FITS__CFITSIO_ffptdm);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_tdim", XS_Astro__FITS__CFITSIO_ffptdm);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffptdmll", XS_Astro__FITS__CFITSIO_ffptdmll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_tdimll", XS_Astro__FITS__CFITSIO_ffptdmll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_tdimll", XS_Astro__FITS__CFITSIO_ffptdmll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffpthp", XS_Astro__FITS__CFITSIO_ffpthp);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_theap", XS_Astro__FITS__CFITSIO_ffpthp);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_theap", XS_Astro__FITS__CFITSIO_ffpthp);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgiwcs", XS_Astro__FITS__CFITSIO_ffgiwcs);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_image_wcs_keys", XS_Astro__FITS__CFITSIO_ffgiwcs);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_image_wcs_keys", XS_Astro__FITS__CFITSIO_ffgiwcs);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgtwcs", XS_Astro__FITS__CFITSIO_ffgtwcs);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_table_wcs_keys", XS_Astro__FITS__CFITSIO_ffgtwcs);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_table_wcs_keys", XS_Astro__FITS__CFITSIO_ffgtwcs);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgipr", XS_Astro__FITS__CFITSIO_ffgipr);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_img_parm", XS_Astro__FITS__CFITSIO_ffgipr);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_img_parm", XS_Astro__FITS__CFITSIO_ffgipr);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgiprll", XS_Astro__FITS__CFITSIO_ffgiprll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_img_parmll", XS_Astro__FITS__CFITSIO_ffgiprll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::get_img_parmll", XS_Astro__FITS__CFITSIO_ffgiprll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgkcl", XS_Astro__FITS__CFITSIO_ffgkcl);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_get_keyclass", XS_Astro__FITS__CFITSIO_ffgkcl);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpxv", XS_Astro__FITS__CFITSIO_ffgpxv);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_pix", XS_Astro__FITS__CFITSIO_ffgpxv);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_pix", XS_Astro__FITS__CFITSIO_ffgpxv);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpxvll", XS_Astro__FITS__CFITSIO_ffgpxvll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_pixll", XS_Astro__FITS__CFITSIO_ffgpxvll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_pixll", XS_Astro__FITS__CFITSIO_ffgpxvll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpxf", XS_Astro__FITS__CFITSIO_ffgpxf);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_pixnull", XS_Astro__FITS__CFITSIO_ffgpxf);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_pixnull", XS_Astro__FITS__CFITSIO_ffgpxf);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffgpxfll", XS_Astro__FITS__CFITSIO_ffgpxfll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_read_pixnullll", XS_Astro__FITS__CFITSIO_ffgpxfll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::read_pixnullll", XS_Astro__FITS__CFITSIO_ffgpxfll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppx", XS_Astro__FITS__CFITSIO_ffppx);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_pix", XS_Astro__FITS__CFITSIO_ffppx);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_pix", XS_Astro__FITS__CFITSIO_ffppx);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppxll", XS_Astro__FITS__CFITSIO_ffppxll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_pixll", XS_Astro__FITS__CFITSIO_ffppxll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_pixll", XS_Astro__FITS__CFITSIO_ffppxll);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppxn", XS_Astro__FITS__CFITSIO_ffppxn);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_pixnull", XS_Astro__FITS__CFITSIO_ffppxn);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_pixnull", XS_Astro__FITS__CFITSIO_ffppxn);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Astro::FITS::CFITSIO::ffppxnll", XS_Astro__FITS__CFITSIO_ffppxnll);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Astro::FITS::CFITSIO::fits_write_pixnullll", XS_Astro__FITS__CFITSIO_ffppxnll);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("fitsfilePtr::write_pixnullll", XS_Astro__FITS__CFITSIO_ffppxnll);
        XSANY.any_i32 = 2;
    }

    /* Initialisation Section */

#if XSubPPtmpAAAA
#endif
#if XSubPPtmpAAAB
#endif
#if XSubPPtmpAAAC
#endif
#line 30648 "CFITSIO.c"

    /* End of Initialisation Section */

#if PERL_VERSION_LE(5, 21, 5)
#  if PERL_VERSION_GE(5, 9, 0)
    if (PL_unitcheckav)
        call_list(PL_scopestack_ix, PL_unitcheckav);
#  endif
    XSRETURN_YES;
#else
    Perl_xs_boot_epilog(aTHX_ ax);
#endif
}

