From: Kirk McKusick Date: Thu, 16 Jul 1981 06:58:41 +0000 (-0800) Subject: rmdel -r1.13 X-Git-Tag: BSD-4_1_snap-Snapshot-Development~1102 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/d669c3b3108011be7560f7eb6d06db32636774a9 rmdel -r1.13 SCCS-vsn: usr.bin/pascal/px/interp.c 1.15 --- diff --git a/usr/src/usr.bin/pascal/px/interp.c b/usr/src/usr.bin/pascal/px/interp.c index 35476ea54f..406afb0e86 100644 --- a/usr/src/usr.bin/pascal/px/interp.c +++ b/usr/src/usr.bin/pascal/px/interp.c @@ -1,6 +1,6 @@ /* Copyright (c) 1979 Regents of the University of California */ -static char sccsid[] = "@(#)interp.c 1.14 %G%"; +static char sccsid[] = "@(#)interp.c 1.15 %G%"; #include #include "whoami.h" @@ -217,6 +217,7 @@ interpreter(base) continue; case O_FCALL: pc.cp++; + tcp = popaddr(); /* ptr to display save area */ tfp = (struct formalrtn *)popaddr(); stp = (struct stack *) pushsp((long)(sizeof(struct stack))); @@ -226,7 +227,7 @@ interpreter(base) pc.cp = tfp->fentryaddr;/* calc new entry point */ _dp = &_display.frame[tfp->fbn];/* new display ptr */ blkcpy(tfp->fbn * sizeof(struct disp), - &_display.frame[1], &tfp->fdisp[tfp->fbn]); + &_display.frame[1], tcp); blkcpy(tfp->fbn * sizeof(struct disp), &tfp->fdisp[0], &_display.frame[1]); continue; @@ -236,13 +237,16 @@ interpreter(base) tl = *pc.usp++; tcp = pushsp((long)(0)); tfp = *(struct formalrtn **)(tcp + tl); + tcp1 = *(char **) + (tcp + tl + sizeof(struct formalrtn *)); if (tl != 0) { - blkcpy(tl, tcp, - tcp + sizeof(struct formalrtn *)); + blkcpy(tl, tcp, tcp + sizeof(struct formalrtn *) + + sizeof(char *)); } - popsp((long)(sizeof(struct formalrtn *))); + popsp((long) + (sizeof(struct formalrtn *) + sizeof (char *))); blkcpy(tfp->fbn * sizeof(struct disp), - &tfp->fdisp[tfp->fbn], &_display.frame[1]); + tcp1, &_display.frame[1]); continue; case O_FSAV: tfp = (struct formalrtn *)popaddr();