added function "isendofproc" to test for END op
authorMark Linton <linton@ucbvax.Berkeley.EDU>
Tue, 9 Mar 1982 11:31:37 +0000 (03:31 -0800)
committerMark Linton <linton@ucbvax.Berkeley.EDU>
Tue, 9 Mar 1982 11:31:37 +0000 (03:31 -0800)
SCCS-vsn: usr.bin/pascal/pdx/machine/nextaddr.c 1.4

usr/src/usr.bin/pascal/pdx/machine/nextaddr.c

index 463fdde..641702f 100644 (file)
@@ -1,6 +1,6 @@
 /* Copyright (c) 1982 Regents of the University of California */
 
 /* Copyright (c) 1982 Regents of the University of California */
 
-static char sccsid[] = "@(#)nextaddr.c 1.3 %G%";
+static char sccsid[] = "@(#)nextaddr.c 1.4 %G%";
 
 /*
  * Calculate the next address that will be executed from the current one.
 
 /*
  * Calculate the next address that will be executed from the current one.
@@ -352,3 +352,17 @@ int incr;
        return(addr + sizeof(short));
     }
 }
        return(addr + sizeof(short));
     }
 }
+
+/*
+ * Determine whether or not the given address corresponds to the
+ * end of a procedure.
+ */
+
+BOOLEAN isendofproc(addr)
+ADDRESS addr;
+{
+    PXOP op;
+
+    iread(&op, addr, sizeof(op));
+    return (op == O_END);
+}