aboutsummaryrefslogtreecommitdiff
path: root/pkg/tbtables/tbcigt.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/tbcigt.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/tbtables/tbcigt.x')
-rw-r--r--pkg/tbtables/tbcigt.x32
1 files changed, 32 insertions, 0 deletions
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 <tbset.h>
+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