From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- noao/onedspec/sensfunc/sfmarks.x | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 noao/onedspec/sensfunc/sfmarks.x (limited to 'noao/onedspec/sensfunc/sfmarks.x') diff --git a/noao/onedspec/sensfunc/sfmarks.x b/noao/onedspec/sensfunc/sfmarks.x new file mode 100644 index 00000000..39d85af6 --- /dev/null +++ b/noao/onedspec/sensfunc/sfmarks.x @@ -0,0 +1,46 @@ +include +include "sensfunc.h" + +define GMTYPES "|point|box|plus|cross|diamond|hline|vline|hebar|vebar|circle|" + + +# SF_MARKS -- Decode user mark types into GIO mark types. The input string +# consists of two whitespace separated mark types. + +procedure sf_marks (gp, marks) + +pointer gp +char marks[ARB] + +int i, nscan(), strdic() +pointer sp, str + +int gmtypes[10] +data gmtypes /GM_POINT,GM_BOX,GM_PLUS,GM_CROSS,GM_DIAMOND,GM_HLINE,GM_VLINE, + GM_HEBAR,GM_VEBAR,GM_CIRCLE/ + +begin + call smark (sp) + call salloc (str, SZ_LINE, TY_CHAR) + call sscan (marks) + call gargwrd (Memc[str], SZ_LINE) + if (nscan() == 1) { + i = strdic (Memc[str], Memc[str], SZ_LINE, GMTYPES) + if (i != 0) + GP_MARK(gp) = gmtypes[i] + } + call gargwrd (Memc[str], SZ_LINE) + if (nscan() == 2) { + i = strdic (Memc[str], Memc[str], SZ_LINE, GMTYPES) + if (i != 0) + GP_MDEL(gp) = gmtypes[i] + } + call gargwrd (Memc[str], SZ_LINE) + if (nscan() == 3) { + i = strdic (Memc[str], Memc[str], SZ_LINE, GMTYPES) + if (i != 0) + GP_MADD(gp) = gmtypes[i] + } + + call sfree (sp) +end -- cgit