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/tbcigt.x | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pkg/tbtables/tbcigt.x (limited to 'pkg/tbtables/tbcigt.x') diff --git a/pkg/tbtables/tbcigt.x b/pkg/tbtables/tbcigt.x new file mode 100644 index 00000000..7f096a5c --- /dev/null +++ b/pkg/tbtables/tbcigt.x @@ -0,0 +1,32 @@ +include +include "tbtables.h" +include "tblerr.h" + +# tbcigt -- get text info about a column +# This procedure returns information of type string about a column: +# either column name, units, or print format. The corresponding +# routine for integer information is tbcigi. +# +# Phil Hodge, 2-Oct-1987 Subroutine created +# Phil Hodge, 14-Apr-1998 Use strcpy instead of strpak; remove pformat. + +procedure tbcigt (cptr, get_what, outstr, maxch) + +pointer cptr # i: pointer to column descriptor +int get_what # i: indicates what string to get +char outstr[maxch] # o: column name, units, or print format +int maxch # i: maximum length of output string +#-- + +begin + switch (get_what) { + case (TBL_COL_NAME): # get column name + call strcpy (COL_NAME(cptr), outstr, maxch) + case (TBL_COL_UNITS): # get units for column + call strcpy (COL_UNITS(cptr), outstr, maxch) + case (TBL_COL_FMT): # get print format + call strcpy (COL_FMT(cptr), outstr, maxch) + default: + call error (ER_TBUNKPARAM, "tbcigt: unknown parameter") + } +end -- cgit