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/tbztyp.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/tbtables/tbztyp.x')
-rw-r--r-- | pkg/tbtables/tbztyp.x | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pkg/tbtables/tbztyp.x b/pkg/tbtables/tbztyp.x new file mode 100644 index 00000000..09d3ad33 --- /dev/null +++ b/pkg/tbtables/tbztyp.x @@ -0,0 +1,27 @@ +include "tblerr.h" + +define SZ_SH_STR 21 # local buffer size + +# Convert a data type expressed as a character string to an integer. +# This version is for text tables, so the data type is coerced if +# necessary into one of the types supported for text tables. +# +# Phil Hodge, 24-Sep-1999 Subroutine created. + +procedure tbztyp (chdtype, datatype) + +char chdtype[ARB] # i: data type expressed as a string +int datatype # o: data type expressed as an int +#-- +errchk tbbtyp + +begin + call tbbtyp (chdtype, datatype) + + if (datatype == TY_REAL) + datatype = TY_DOUBLE + else if (datatype == TY_SHORT) + datatype = TY_INT + else if (datatype == TY_BOOL) + datatype = -8 # character*8 +end |