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/utilities/nttools/threed/tiimage/tmcp1.gx | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/utilities/nttools/threed/tiimage/tmcp1.gx')
-rw-r--r-- | pkg/utilities/nttools/threed/tiimage/tmcp1.gx | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/pkg/utilities/nttools/threed/tiimage/tmcp1.gx b/pkg/utilities/nttools/threed/tiimage/tmcp1.gx new file mode 100644 index 00000000..b90ca406 --- /dev/null +++ b/pkg/utilities/nttools/threed/tiimage/tmcp1.gx @@ -0,0 +1,54 @@ + +# TM_CP1 -- Fill pixel buffer and copy into table. +# +# +# +# +# Revision history: +# ---------------- +# 30-Jan-97 - Task created (I.Busko) + + +procedure tm_cp1$t (im, tp, cp, row, lena, leni) + +pointer im # imio pointer +pointer tp # table pointer +pointer cp # column pointer +int row # row where to begin insertion +int lena # array length +int leni # image length +#-- +pointer buf +double undefd +real undefr +int undefi, i, len +short undefs + +pointer imgl1$t() + +begin + # Read pixels into buffer. + buf = imgl1$t (im) + + # Choose the minimum between image and table array + # lengths as the array size to be written to table. + len = min (lena, leni) + + # Write buffer into array cell element. + call tbapt$t (tp, cp, row, Mem$t[buf], 1, len) + + # If image is smaller than array, set + # remaining elements to INDEF. + if (leni < lena) { + undefd = INDEFD + undefr = INDEFR + undefi = INDEFI + undefs = INDEFS + do i = len+1, lena + call tbapt$t (tp, cp, row, undef$t, i, 1) + } +end + + + + |