/* FILE: iraf_getd.c * PURPOSE: Get a double IRAF parameter. * AUTHOR: Kenneth J. Mighell (mighell@noao.edu) * LANGUAGE: ANSI C * DATE: 2001JUL03 * COPYRIGHT: (C) 2001 Assoc. of Universities for Research in Astronomy Inc. */ #include "mx.h" #include "qdphot.h" int qdphot5_IrafParDoubleGet_vf4 ( char text[], double defaultd, double *valued_p, int *is_INDEF_p ){ char mxfunc[] = "qdphot5_IrafParDoubleGet_vf4"; int status; double valued; int is_INDEF; double d; /* * Initialization */ status = 0; valued = IRAF_INDEFD; is_INDEF = MX_TRUE; d = c_clgetd (text); if (mxiraf_cvos_error_check_f0()) {status=1; goto mx_error1;} is_INDEF = (d == IRAF_INDEFD); if (is_INDEF) d = defaultd; valued = d; ok: status = 0; goto bye; mx_error1: mxp_tmpmsg_init_f0(); mx_error2: mxp_errmsg_append_f3 (mxfunc, status, MX.tmpmsg); goto bye; bye: *valued_p = valued; *is_INDEF_p = is_INDEF; return(status); } /* end-of-file */