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/tbtables/tbcdes.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/tbtables/tbcdes.x')
-rw-r--r-- | pkg/tbtables/tbcdes.x | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/pkg/tbtables/tbcdes.x b/pkg/tbtables/tbcdes.x new file mode 100644 index 00000000..aa6ffc88 --- /dev/null +++ b/pkg/tbtables/tbcdes.x @@ -0,0 +1,35 @@ +include <tbset.h> +include "tbtables.h" + +# tbcdes -- get the column selector descriptor +# This function returns the column selector descriptor corresponding to +# the input column pointer. NULL will be returned if the column pointer +# does not match any selected column, or if there is no column selector. +# +# Phil Hodge, 3-Oct-1997 Function created. + +pointer procedure tbcdes (tp, cp) + +pointer tp # i: pointer to table descriptor +pointer cp # i: pointer to column descriptor +#-- +pointer descrip # column selector descriptor +int colnum # loop index for selected column number +pointer tcs_column() # column pointer as function of descriptor + +begin + descrip = NULL + + if (TB_COLUMN_SELECT(tp) == YES) { # column selector was used + + do colnum = 1, TB_NSEL_COLS(tp) { # all selected columns + descrip = TB_SELCOL(tp,colnum) + if (cp == tcs_column (descrip)) + break # found it + else + descrip = NULL + } + } + + return (descrip) +end |