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 /vo/votools/t_votsize.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'vo/votools/t_votsize.x')
-rw-r--r-- | vo/votools/t_votsize.x | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/vo/votools/t_votsize.x b/vo/votools/t_votsize.x new file mode 100644 index 00000000..6fae7049 --- /dev/null +++ b/vo/votools/t_votsize.x @@ -0,0 +1,32 @@ +# +# VOTSIZE -- Simply get the size of a VOTable. We need to work on the +# VOTable itself since the TABLES tasks don't generally behave well when +# there are no rows in a table. + +include <ctype.h> +include <votParse_spp.h> + + +procedure t_votsize () + +char in[SZ_LINE] +char out[SZ_LINE], line[SZ_LINE] + +int fd, nchars +int vx_voinfo(), open(), getline() + +begin + # Get the table name. + call clgstr ("input", in, SZ_LINE) + + call mktemp ("/tmp/sz", out, SZ_LINE) + call vx_voinfo (3, "-s", out, in) + + fd = open (out, READ_ONLY, TEXT_FILE) + nchars = getline (fd, line) + call close (fd) + + call printf ("%s") + call pargstr (line) + call delete (out) +end |