date and time created 82/01/18 19:20:57 by linton
authorMark Linton <linton@ucbvax.Berkeley.EDU>
Tue, 19 Jan 1982 11:20:57 +0000 (03:20 -0800)
committerMark Linton <linton@ucbvax.Berkeley.EDU>
Tue, 19 Jan 1982 11:20:57 +0000 (03:20 -0800)
SCCS-vsn: usr.bin/pascal/pdx/runtime/isactive.c 1.1

usr/src/usr.bin/pascal/pdx/runtime/isactive.c [new file with mode: 0644]

diff --git a/usr/src/usr.bin/pascal/pdx/runtime/isactive.c b/usr/src/usr.bin/pascal/pdx/runtime/isactive.c
new file mode 100644 (file)
index 0000000..8cdf3d7
--- /dev/null
@@ -0,0 +1,27 @@
+/* Copyright (c) 1982 Regents of the University of California */
+
+static char sccsid[] = "@(#)isactive.c 1.1 %G%";
+
+/*
+ * Decide a the given function is currently active.
+ */
+
+#include "defs.h"
+#include "runtime.h"
+#include "frame.rep"
+#include "sym.h"
+#include "machine.h"
+#include "process.h"
+
+BOOLEAN isactive(f)
+SYM *f;
+{
+       if (isfinished(process)) {
+               return(FALSE);
+       } else {
+               if (f == program) {
+                       return(TRUE);
+               }
+               return(findframe(f) != NIL);
+       }
+}