aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/photcal/mctable/mctnrows.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 /noao/digiphot/photcal/mctable/mctnrows.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/digiphot/photcal/mctable/mctnrows.x')
-rw-r--r--noao/digiphot/photcal/mctable/mctnrows.x19
1 files changed, 19 insertions, 0 deletions
diff --git a/noao/digiphot/photcal/mctable/mctnrows.x b/noao/digiphot/photcal/mctable/mctnrows.x
new file mode 100644
index 00000000..06c688c9
--- /dev/null
+++ b/noao/digiphot/photcal/mctable/mctnrows.x
@@ -0,0 +1,19 @@
+include "../lib/mctable.h"
+
+
+# MCT_NROWS - Return the highest row number entered into the table
+
+int procedure mct_nrows (table)
+
+pointer table # table descriptor
+
+begin
+ # Check pointer and magic number.
+ if (table == NULL)
+ call error (0, "mct_nrows: Null table pointer")
+ if (MCT_MAGIC (table) != MAGIC)
+ call error (0, "mct_nrows: Bad magic number")
+
+ # Return row counter.
+ return (MCT_NPROWS (table))
+end