/* MX LIBRARY INCLUDE FILE: mx.h * * PURPOSE: C programs using the MX library *must* include this file! * * AUTHOR: K. J. Mighell (mighell@noao.edu) * * LANGUAGE: ANSI C * * DOCUMENTATION: http://www.noao.edu/staff/mighell/mx * * DATE: 20000317 * * MOD: 15 * * Copyleft (L) 2000 Kenneth John Mighell */ # ifndef MX_H # define MX_H "MX IRAF/CVOS/C interface library" # define MX_AUTHOR "Kenneth J. Mighell" # define MX_EMAIL "mighell@noao.edu" # define MX_URL "http://www.noao.edu/staff/mighell/mx/" # define MX_COPYLEFT "Copyleft (L) 2000 Kenneth J. Mighell" # define MX_DATE 20000317 # define MX_MOD 15 /* C standard header files */ #include #include #include #include /* CVOS header files */ # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # define MX_OK 0 # define MX_FALSE 0 # define MX_TRUE 1 typedef int MX_Verbose; # define MX_SILENT 0 # define MX_VERBOSE 1 # define MX_FNAME_LEN 255 # define MX_COMMENT_LEN MX_FNAME_LEN # define MX_MSG_LEN 1023 # define MX_OPENED MX_DATE struct mx_s{ int opened; char errmsg[MX_MSG_LEN+1]; char tmpmsg[MX_MSG_LEN+1]; }; struct mx_s MX; extern int mxp_init_f0 (void); extern int mxp_errmsg_dump_f0 (void); extern int mxp_errmsg_set_f3 ( char *function_name, int status, char *additional_text ); extern int mxp_errmsg_append_f3 ( char *function_name, int status, char *additional_text ); extern int mxp_int_range_f3( int value, int minimum, int maximum ); extern int mxp_dummy_f0 (void); extern int mxp_tmpmsg_init_f0 (void); extern int mxp_errmsg_init_f0 (void); struct mxip_image_s{ int openedi; int nxi; int nyi; int npxi; int llx0i; int lly0i; int mpxi; char comment[MX_COMMENT_LEN+1]; double *vectord; double **matrixd; }; extern int mxip_image_s_open_f7( struct mxip_image_s **out, int nx, int ny, int idx0, int idy0, int mpx_, char *comment ); extern int mxip_image_s_info_f1( struct mxip_image_s *image ); extern int mxip_image_s_ok_f1( struct mxip_image_s *image ); extern int mxip_image_s_close_f1( struct mxip_image_s **old ); extern int mxip_image_s_copy_f2( struct mxip_image_s *in, struct mxip_image_s **out ); extern int mxip_image_s_ramp_f1( struct mxip_image_s *image ); extern int mxip_image_s_limits_check_f5( struct mxip_image_s *image, int ix0b, int ix0e, int iy0b, int iy0e ); extern int mxip_image_s_list_f5( struct mxip_image_s *image, int ix0b, int ix0e_, int iy0b, int iy0e_ ); extern int mxip_image_s_const_add_f2( struct mxip_image_s *image, double addend ); extern int mxip_image_s_const_mul_f2( struct mxip_image_s *image, double multiplier ); extern int mxiraf_cvos_error_check_f0 (void); /* * HACK ALERT: begin ======================================================== * * MX_IRAF_SZ_FNAME must have the same value as the IRAF constant SZ_FNAME */ # define MX_IRAF_SZ_FNAME 255 /* * HACK ALERT: end ========================================================== */ struct mxiraf_image_s{ int openedi; IRAFPointer ptr; IRAFType pxtype; IRAFIOMode iomode; char name[MX_IRAF_SZ_FNAME+1]; char section[MX_IRAF_SZ_FNAME+1]; int ndimi; int NXI; int NYI; int LLX0I; int LLY0I; struct mxip_image_s *data; }; extern int mxiraf_image_s_open_f3( struct mxiraf_image_s **out, char *name, IRAFIOMode iomode ); extern int mxiraf_image_s_ok_f1( struct mxiraf_image_s *image ); extern int mxiraf_image_s_close_f1( struct mxiraf_image_s **old ); extern int mxiraf_image_s_info_f1( struct mxiraf_image_s *image ); extern int mxiraf_image_s_limits_check_f5( struct mxiraf_image_s *image, int ix0b, int ix0e, int iy0b, int iy0e ); extern int mxiraf_image_s_list_f5( struct mxiraf_image_s *image, int ix0b, int ix0e_, int iy0b, int iy0e_ ); #endif /* end-of-file */