/* MX LIBRARY FUNCTION: mxip_image_s_limits_check_f5 * * PURPOSE: Check limits against a mxip_image_s structure. * * AUTHOR: K. J. Mighell (mighell@noao.edu) * * LANGUAGE: ANSI C * * DOCUMENTATION: http://www.noao.edu/staff/mighell/mx * * DATE: 20000313 * * MOD: 3 * * Copyleft (L) 2000 Kenneth John Mighell */ #include "mx.h" int mxip_image_s_limits_check_f5( struct mxip_image_s *image, int ix0b, int ix0e, int iy0b, int iy0e ) { char mxfunc[] = "mxip_image_s_limits_check_f5"; int status; int ixmn; int ixmx; int iymn; int iymx; status = 0; if ( mxip_image_s_ok_f1 (image) ) { status = 1; mxp_tmpmsg_init_f0 (); goto error2; } ixmn = 0; ixmx = (image->nxi) - 1; if ( mxp_int_range_f3 (ix0b, ixmn, ixmx) ) { status = 2; sprintf (MX.tmpmsg, "# limit problems with ix0b=%d\n", ix0b); goto error2; } if ( mxp_int_range_f3 (ix0e, ixmn, ixmx) ) { status = 3; sprintf (MX.tmpmsg, "# limit problems with ix0e=%d\n", ix0e); goto error2; } if (ix0enyi) - 1; if ( mxp_int_range_f3 (iy0b, iymn, iymx) ) { status = 5; sprintf (MX.tmpmsg, "# limit problems with iy0b=%d\n", iy0b); goto error2; } if ( mxp_int_range_f3 (iy0e, iymn, iymx) ) { status = 6; sprintf (MX.tmpmsg, "# limit problems with iy0e=%d\n", iy0e); goto error2; } if (iy0e