diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /noao/onedspec/sensfunc/sfmarks.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/onedspec/sensfunc/sfmarks.x')
-rw-r--r-- | noao/onedspec/sensfunc/sfmarks.x | 46 |
1 files changed, 46 insertions, 0 deletions
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 <gset.h> +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 |