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/utilities/nttools/tcopy/iswholetab.x | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pkg/utilities/nttools/tcopy/iswholetab.x (limited to 'pkg/utilities/nttools/tcopy/iswholetab.x') diff --git a/pkg/utilities/nttools/tcopy/iswholetab.x b/pkg/utilities/nttools/tcopy/iswholetab.x new file mode 100644 index 00000000..a2a981ed --- /dev/null +++ b/pkg/utilities/nttools/tcopy/iswholetab.x @@ -0,0 +1,24 @@ +# IS_WHOLETAB -- Return true if table name has no extension + +bool procedure is_wholetab (table) + +char table[ARB] # i: table name +#-- +bool wholetab +int nc, hdu +pointer sp, fname, extname + +int tbparse() + +begin + call smark (sp) + call salloc (fname, SZ_FNAME, TY_CHAR) + call salloc (extname, SZ_FNAME, TY_CHAR) + + nc = tbparse (table, Memc[fname], Memc[extname], SZ_FNAME, hdu) + + wholetab = Memc[extname] == EOS + + call sfree (sp) + return (wholetab) +end -- cgit