/* FILE: /mxtools/src/mximg2d/par_get.c * PURPOSE: Get ParS input parameters * AUTHOR: Kenneth J. Mighell (mighell@noao.edu) * LANGUAGE: ANSI C * DATE: 2001OCT26 * COPYRIGHT: (C) 2001 Assoc. of Universities for Research in Astronomy Inc. */ #include #include "inc.h" int inc_ParS_Get_i1 ( inc_ParS *ParS ){ char mxfunc[] = "inc_ParS_Get_i1"; int mxstatus = 0; int status; int is_INDEF; double tx; mxstatus++; status = IrafParStringGet_v5( "image", "", ParS->image, sizeof(ParS->image), &is_INDEF ); if (status) goto mx_error1; if (is_INDEF) { sprintf( MX.tmpmsg, "IMAGE can not be INDEF!\n"); goto mx_error2; } mxstatus++; status = IrafParDoubleGet_v4( "volume", 0.0, &ParS->volume, &is_INDEF); if (status) goto mx_error1; mxstatus++; if (is_INDEF) { sprintf( MX.tmpmsg, "VOLUME can not be INDEF!\n"); goto mx_error2; } mxstatus++; status = IrafParDoubleGet_v4( "sigma", 0.0, &ParS->sigma, &is_INDEF); if (status) goto mx_error1; mxstatus++; if (is_INDEF) { sprintf( MX.tmpmsg, "SIGMA can not be INDEF!\n"); goto mx_error2; } mxstatus++; status = IrafParDoubleGet_v4( "x", 0.0, &ParS->x, &is_INDEF); if (status) goto mx_error1; mxstatus++; if (is_INDEF) { sprintf( MX.tmpmsg, "X can not be INDEF!\n"); goto mx_error2; } mxstatus++; status = IrafParDoubleGet_v4( "y", 0.0, &ParS->y, &is_INDEF); if (status) goto mx_error1; mxstatus++; if (is_INDEF) { sprintf( MX.tmpmsg, "Y can not be INDEF!\n"); goto mx_error2; } strcpy( ParS->MXIMG2D, MXIMG2D_DATE); strcpy( ParS->PROGFILE, "mxtools$src/mximg2d/mximg2d.c"); strcpy( ParS->PROGDATE, __DATE__); strcpy( ParS->PROGTIME, __TIME__); ok: status = 0; goto bye; mx_error1: mxp_tmpmsg_init_f0(); mx_error2: mxp_errmsg_append_f3 (mxfunc, mxstatus, MX.tmpmsg); mxp_tmpmsg_init_f0(); status = 1; fflush(stdout); goto bye; bye: return(status); } /* end-of-file */