/* FILE: /mxtools/src/mximstat/iraf_gstr.c * PURPOSE: Get an IRAF string IRAF parameter. * AUTHOR: Kenneth J. Mighell (mighell@noao.edu) * LANGUAGE: ANSI C * DATE: 2001OC26 * COPYRIGHT: (C) 2001 Assoc. of Universities for Research in Astronomy Inc. */ #include "mx.h" #include "inc.h" int IrafParStringGet_v5 ( char text[], char default_value[], char value[], int maxch, int *is_INDEF_p ){ char mxfunc[] = "IrafParStringGet_v5"; int status=-1; int is_INDEF; c_clgstr (text, value, maxch ); if (mxiraf_cvos_error_check_f0()) {status=1; goto mx_error1;} is_INDEF = (value[0] == '\0'); if (is_INDEF) strncpy( value, default_value, maxch ); ok: status = 0; *is_INDEF_p = is_INDEF; goto bye; mx_error1: mxp_tmpmsg_init_f0(); mx_error2: mxp_errmsg_append_f3 (mxfunc, status, MX.tmpmsg); goto bye; bye: return(status); } /* end-of-file */