From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- pkg/tbtables/tbcfnd1.x | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pkg/tbtables/tbcfnd1.x (limited to 'pkg/tbtables/tbcfnd1.x') diff --git a/pkg/tbtables/tbcfnd1.x b/pkg/tbtables/tbcfnd1.x new file mode 100644 index 00000000..db789c0d --- /dev/null +++ b/pkg/tbtables/tbcfnd1.x @@ -0,0 +1,25 @@ +include + +# tbcfnd1 -- find a column +# Find a column in a table. This just calls tbcfnd. +# If the column is not found in the table, colptr will be set to NULL. +# +# Phil Hodge, 21-Aug-1995 Subroutine created. + +procedure tbcfnd1 (tp, colname, colptr) + +pointer tp # i: pointer to table descriptor +char colname[SZ_COLNAME] # i: name of column +pointer colptr # o: pointer to column, or NULL +#-- +pointer cp[1] # pointer to column, or NULL +char cname[SZ_COLNAME,1] # name of column +errchk tbcfnd + +begin + call strcpy (colname[1], cname[1,1], SZ_COLNAME) + + call tbcfnd (tp, cname, cp, 1) + + colptr = cp[1] +end -- cgit