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 /pkg/images/imutil/src/t_sections.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/images/imutil/src/t_sections.x')
-rw-r--r-- | pkg/images/imutil/src/t_sections.x | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkg/images/imutil/src/t_sections.x b/pkg/images/imutil/src/t_sections.x new file mode 100644 index 00000000..560e2a2f --- /dev/null +++ b/pkg/images/imutil/src/t_sections.x @@ -0,0 +1,39 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# SECTIONS -- Expand a image template into a list of images on the +# standard output and record the number of sections in a parameter. + +procedure t_sections() + +char images[SZ_LINE] # Image template +char image[SZ_FNAME] +char str[SZ_LINE] +int option, list +int clgwrd(), imtopen(), imtgetim(), imtlen() + +begin + call clgstr ("images", images, SZ_LINE) + option = clgwrd ("option", str, SZ_LINE, + ",nolist,fullname,root,section,") + list = imtopen (images) + + call clputi ("nimages", imtlen (list)) + + while (imtgetim (list, image, SZ_FNAME) != EOF) { + switch (option) { + case 2: + call printf ("%s\n") + call pargstr (image) + case 3: + call get_root (image, str, SZ_LINE) + call printf ("%s\n") + call pargstr (str) + case 4: + call get_section (image, str, SZ_LINE) + call printf ("%s\n") + call pargstr (str) + } + } + + call imtclose (list) +end |