/* MX LIBRARY FUNCTION: mxiraf_image_s_ok_f1 * * PURPOSE: Is a mxiraf_image_s structure OK? * * 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 mxiraf_image_s_ok_f1( struct mxiraf_image_s *image ) { char mxfunc[] = "mxiraf_image_s_ok_f1"; int status; int npx; if ((struct mxiraf_image_s *)NULL==image) { status = 1; sprintf (MX.tmpmsg, "# image==(struct mxiraf_image_s *)NULL\n"); goto error; } if (MX_OPENED!=(image->openedi)) { status = 2; sprintf (MX.tmpmsg, "# image->openedi!=MX_OPENED\n"); goto error; } if ( mxip_image_s_ok_f1(image->data) ) { status = 3; goto error2; } ok: status = 0; goto bye; error: mxp_errmsg_set_f3 (mxfunc, status, MX.tmpmsg); goto bye; error2: mxp_errmsg_append_f3 (mxfunc, status, ""); goto bye; bye: return (status); } /* end-of-file */