aboutsummaryrefslogtreecommitdiff
path: root/pkg/tbtables/tbywnc.x
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/tbtables/tbywnc.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/tbtables/tbywnc.x')
-rw-r--r--pkg/tbtables/tbywnc.x31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkg/tbtables/tbywnc.x b/pkg/tbtables/tbywnc.x
new file mode 100644
index 00000000..7831af2d
--- /dev/null
+++ b/pkg/tbtables/tbywnc.x
@@ -0,0 +1,31 @@
+include "tbtables.h"
+
+# tbywnc -- Y write new column
+# Write new column descriptors into a column-ordered table.
+# The table must have already been reorganized (if necessary) to make
+# sufficient space for column descriptors or row length.
+#
+# Phil Hodge, 1-May-1989 Change calling sequence; don't call tbysiz.
+# Phil Hodge, 14-Apr-1998 Change calling sequence of tbcwcd;
+# change LEN_COLSTRUCT to LEN_COLDEF.
+
+procedure tbywnc (tp, colptr, numcols)
+
+pointer tp # i: pointer to table descriptor
+pointer colptr[numcols] # i: pointers to descriptors for new columns
+int numcols # i: number of new columns
+#--
+pointer cp # Pointer to a specific column
+int k # Loop index
+errchk tbcwcd, tbyncn
+
+begin
+ # Write descriptors of new columns to table.
+ do k = 1, numcols {
+ cp = colptr[k]
+ call tbcwcd (tp, cp)
+ }
+
+ # Assign indef values for each new column and all allocated rows.
+ call tbyncn (tp, colptr, numcols)
+end