aboutsummaryrefslogtreecommitdiff
path: root/pkg/tbtables/tbtren.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/tbtren.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/tbtables/tbtren.x')
-rw-r--r--pkg/tbtables/tbtren.x28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkg/tbtables/tbtren.x b/pkg/tbtables/tbtren.x
new file mode 100644
index 00000000..808a3cbc
--- /dev/null
+++ b/pkg/tbtables/tbtren.x
@@ -0,0 +1,28 @@
+include <tbset.h>
+include "tbtables.h"
+
+# tbtren -- rename a table
+# This procedure renames a table from inname to outname. The default
+# extension will be appended if an extension is not present and the input
+# file is a binary table. If intable is a text file, no extension will be
+# appended to outtable.
+#
+# Phil Hodge, 28-Dec-1989 Open before renaming to verify that it is a table.
+# Phil Hodge, 14-May-1992 Check for text table; call tbtext only if binary.
+# Phil Hodge, 26-Jun-1995 Modify for FITS file or CDF file.
+
+procedure tbtren (intable, outtable)
+
+char intable[ARB] # i: name of table to be renamed to outtable
+char outtable[ARB] # i: new name of table
+#--
+errchk tbtcpy, tbtdel
+
+begin
+ # For the time being, use tbtcpy and tbtdel. After the CDF
+ # interface is available, copy code from tbtcpy and tbtdel
+ # to here so we don't open the input table twice.
+
+ call tbtcpy (intable, outtable)
+ call tbtdel (intable)
+end