aboutsummaryrefslogtreecommitdiff
path: root/pkg/utilities/nttools/threed/txtable/txtcpt.gx
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 /pkg/utilities/nttools/threed/txtable/txtcpt.gx
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/utilities/nttools/threed/txtable/txtcpt.gx')
-rw-r--r--pkg/utilities/nttools/threed/txtable/txtcpt.gx53
1 files changed, 53 insertions, 0 deletions
diff --git a/pkg/utilities/nttools/threed/txtable/txtcpt.gx b/pkg/utilities/nttools/threed/txtable/txtcpt.gx
new file mode 100644
index 00000000..9a8ae930
--- /dev/null
+++ b/pkg/utilities/nttools/threed/txtable/txtcpt.gx
@@ -0,0 +1,53 @@
+#
+# TXTCPT -- Copy data to output table. If array, copy into column.
+# If scalar, either write as column or write into header.
+#
+#
+#
+#
+# Revision history:
+# ----------------
+#
+# 22-Nov-1996 - Task created (I.Busko)
+# 7-Feb-2000 - For datatype = 'c', make buf an array of strings (P.Hodge)
+
+$if (datatype == c)
+procedure txtcptt (otp, ocp, buf, maxch, start, nbuf, icol, compact)
+$else
+procedure txtcpt$t (otp, ocp, buf, start, nbuf, icol, compact)
+$endif
+
+pointer otp # i: table descriptor
+pointer ocp # i: column descriptor
+$if (datatype == c)
+char buf[maxch,ARB] # i: array of values
+$else
+PIXEL buf[ARB]
+$endif
+$if (datatype == c)
+int maxch # i: max length of string
+$endif
+int start # i: starting row in output table
+int nbuf # i: number of elements to write into output
+int icol # i: column number in input table
+bool compact # i: write scalars as header keywords ?
+#--
+
+begin
+ if (ocp != NULL) {
+
+ $if (datatype == c)
+ call tbcptt (otp, ocp, buf, maxch, start, nbuf)
+ $else
+ call tbcpt$t (otp, ocp, buf, start, nbuf)
+ $endif
+
+ } else if (compact) {
+
+ $if (datatype == c)
+ call txthvt (otp, icol, buf)
+ $else
+ call txthv$t (otp, icol, buf[1])
+ $endif
+ }
+end