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/digiphot/photcal/mctable/mctclear.gx | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/digiphot/photcal/mctable/mctclear.gx')
-rw-r--r-- | noao/digiphot/photcal/mctable/mctclear.gx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/noao/digiphot/photcal/mctable/mctclear.gx b/noao/digiphot/photcal/mctable/mctclear.gx new file mode 100644 index 00000000..58eacba9 --- /dev/null +++ b/noao/digiphot/photcal/mctable/mctclear.gx @@ -0,0 +1,33 @@ +include "../lib/mctable.h" + + +$for (csilrdxp) +# MCT_CLEAR - Clear all table values with given value. Do not reset any +# table counter. + +procedure mct_clear$t (table, value) + +pointer table # table descriptor +PIXEL value # value + +begin + # Check pointer and magic number + if (table == NULL) + call error (0, "mct_clear: Null table pointer") + if (MCT_MAGIC (table) != MAGIC) + call error (0, "mct_clear: Bad magic number") + + # Check table type + if (MCT_TYPE (table) != TY_PIXEL) + call error (0, "mct_clear: Wrong table type") + + # Move value to data buffer + $if (datatype == p) + call amovki (value, Memi[MCT_DATA (table)], + MCT_MAXROW (table) * MCT_MAXCOL (table)) + $else + call amovk$t (value, Mem$t[MCT_DATA (table)], + MCT_MAXROW (table) * MCT_MAXCOL (table)) + $endif +end +$endfor |