aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/photcal/lib/mctable.h
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /noao/digiphot/photcal/lib/mctable.h
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/digiphot/photcal/lib/mctable.h')
-rw-r--r--noao/digiphot/photcal/lib/mctable.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/noao/digiphot/photcal/lib/mctable.h b/noao/digiphot/photcal/lib/mctable.h
new file mode 100644
index 00000000..70d8b9c9
--- /dev/null
+++ b/noao/digiphot/photcal/lib/mctable.h
@@ -0,0 +1,28 @@
+# Multicolumn table structure.
+
+# Pointer Mem
+define MEMP Memi
+
+# Magic number
+define MAGIC 1989
+
+# Growing factor computation. This formula is used to compute
+# the increment is memory allocation in terms of the memory
+# already allocated, but avoiding a zero or a large factor.
+# The real number in the formula represents the fraction to grow,
+# and it should be greater than zero and less than one, although
+# the formula takes care of out of range values.
+define GROWFACTOR min (max (int ($1 * 0.5), 1), $1) # 50%
+
+# Multi-column table structure
+define LEN_MCTABLE 10 # structure size
+define MCT_MAGIC Memi[$1+0] # magic number
+define MCT_TYPE Memi[$1+1] # table data type
+define MCT_MAXROW Memi[$1+2] # max number of rows (growing)
+define MCT_MAXCOL Memi[$1+3] # max number of columns (fixed)
+define MCT_INCROWS Memi[$1+4] # row growing increment
+define MCT_NPROWS Memi[$1+5] # highest row entered
+define MCT_NPCOLS Memi[$1+6] # highest column entered
+define MCT_NGROWS Memi[$1+7] # highest row gotten
+define MCT_NGCOLS Memi[$1+8] # highest column gotten
+define MCT_DATA MEMP[$1+9] # data buffer pointer