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/lib/allcols.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/utilities/nttools/lib/allcols.x')
-rw-r--r-- | pkg/utilities/nttools/lib/allcols.x | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/pkg/utilities/nttools/lib/allcols.x b/pkg/utilities/nttools/lib/allcols.x new file mode 100644 index 00000000..64e49786 --- /dev/null +++ b/pkg/utilities/nttools/lib/allcols.x @@ -0,0 +1,29 @@ +include <tbset.h> + +# ALLCOLS -- Return a pointer to an array containing the indices of all +# the columns in a table. The calling procedure must free the array when it +# is through with it. +# +# B.Simon 11-Dec-87 First Code + +procedure allcolumns (tp, numcol, colptr) + +pointer tp # i: Table descriptor +int numcol # o: Number of columns in the table +pointer colptr # o: Pointer to array of indices + +int icol + +int tbpsta(), tbcnum() + +errchk tbpsta, malloc + +begin + + numcol = tbpsta (tp, TBL_NCOLS) + call malloc (colptr, numcol, TY_INT) + + do icol = 1, numcol + Memi[colptr+icol-1] = tbcnum (tp, icol) + +end |