- word i, j, fp, gp, oba, g, slen, dim, t1, t2, tp, ftv;
- protdescr *ptr;
- bool junk;
- word x[ MAXHDLEN+1 ], y[ MAXHDLEN+1 ];
- /* The two arrays declared above may be dynamically generated as objects */
- /* upon entry to heads. In fact heads was implemented this way in the */
- /* original LOGLAN running system on MERA-400 */
-
- oba = M[ virt->addr ];
- ptr = prototype[ M[ oba+PROTNUM ] ];
- fp = M[ ptr->pfdescr+nr ]; /* parameter description pointer */
- slen = M[ fp+2 ]; /* length of its desclist */
- if (slen > MAXHDLEN) errsignal(RTEFHTLG);
- ftv = oba+M[ ptr->parlist+nr ]; /* type value pointer */
- g = M[ ftv ];
- if (M[ ftv+1 ] == M[ g+1 ]) /* not none */
- g = M[ g ]; /* am of SL */
- else errsignal(RTESLCOF); /* SL chain cut off */
- gp = M[ ftv+2 ]; /* prototype number of g */
- ptr = prototype[ gp ];
- t2 = M[ fp ]; /* t2 = F-kind */
- if (ptr->kind == FUNCTION)
- {
- if (t2 != FORMFUNC) errsignal(RTEINCHS);
- junk = typep0(g, gp, TRUE, &dim, &tp);
- junk = typep0(oba, fp+2, FALSE, &t1, &t2);
- if (typef(dim, tp, t1, t2)) errsignal(RTEINCHS);
- }
- else
- if (t2 != FORMPROC) errsignal(RTEINCHS);
- if (slen != ptr->lthparlist) /* incompatible lengths */
- errsignal(RTEINCHS);
- t1 = M[ fp+1 ]-1; /* oba descriptlist */
- t2 = ptr->pfdescr-1; /* g descriptlist */
- for (i = 1; i <= slen; i++ ) /* verify second order lists */
- {
- x[ i ] = DUMMY; /* mark entry as empty */
- y[ i ] = DUMMY;
- fp = M[ t1+i ]; /* first type pointer */
- gp = M[ t2+i ]; /* second type pointer */
- tp = M[ fp ]; /* first type ordinal */
- if (tp != M[ gp ]) errsignal(RTEINCHS);
- if (tp == FORMTYPE)
- {
- x[ i ] = fp; /* save pointers to formal types */
- y[ i ] = gp;
+ word i, j, fp, gp, oba, g, slen, dim, t1, t2, tp, ftv;
+ protdescr *ptr;
+ bool junk;
+ word x[MAXHDLEN + 1], y[MAXHDLEN + 1];
+ /* The two arrays declared above may be dynamically generated as objects */
+ /* upon entry to heads. In fact heads was implemented this way in the */
+ /* original LOGLAN running system on MERA-400 */
+
+ oba = M[virt->addr];
+ ptr = prototype[M[oba + PROTNUM]];
+ /* parameter description pointer */
+ fp = M[ptr->pfdescr + nr];
+ /* length of its desclist */
+ slen = M[fp + 2];
+ if (slen > MAXHDLEN)
+ errsignal(RTEFHTLG);
+ /* type value pointer */
+ ftv = oba + M[ptr->parlist + nr];
+ g = M[ftv];
+ /* not none */
+ if (M[ftv + 1] == M[g + 1 ]) {
+ /* am of SL */
+ g = M[g];