aboutsummaryrefslogtreecommitdiff
path: root/sys/symtab/stnsym.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/symtab/stnsym.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/symtab/stnsym.x')
-rw-r--r--sys/symtab/stnsym.x23
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/symtab/stnsym.x b/sys/symtab/stnsym.x
new file mode 100644
index 00000000..f3d0f8e1
--- /dev/null
+++ b/sys/symtab/stnsym.x
@@ -0,0 +1,23 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include "symtab.h"
+
+# STNSYMBOLS -- Return the number of symbols in the symbol table or in a
+# marked segment, i.e., the number of symbols added to the table since the
+# mark was made.
+
+int procedure stnsymbols (stp, marker)
+
+pointer stp # symbol table pointer
+int marker # stmark marker or 0 for entire table
+
+pointer mp
+
+begin
+ if (marker <= 0)
+ return (ST_NSYMBOLS(stp))
+ else {
+ mp = ST_STABP(stp) + marker
+ return (ST_NSYMBOLS(stp) - M_NSYMBOLS(mp))
+ }
+end