SCCS-vsn: usr.bin/pascal/src/call.c 5.2
SCCS-vsn: usr.bin/pascal/src/fhdr.c 5.2
SCCS-vsn: usr.bin/pascal/src/lval.c 5.2
SCCS-vsn: usr.bin/pascal/src/var.c 5.2
-static char sccsid[] = "@(#)call.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)call.c 5.2 (Berkeley) %G%";
#endif not lint
#include "whoami.h"
#endif not lint
#include "whoami.h"
- if (p2 == NLNIL || p2->chain->class != CRANGE) {
+ if (p2 == NLNIL || p2->chain == NLNIL || p2->chain->class != CRANGE) {
if (q != p2) {
error("Parameter type not identical to type of var parameter %s of %s", p1->symbol, p->symbol);
chk = FALSE;
if (q != p2) {
error("Parameter type not identical to type of var parameter %s of %s", p1->symbol, p->symbol);
chk = FALSE;
-static char sccsid[] = "@(#)fhdr.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)fhdr.c 5.2 (Berkeley) %G%";
#endif not lint
#include "whoami.h"
#endif not lint
#include "whoami.h"
# endif PC
for (formalp = formalist; formalp != TR_NIL;
formalp = formalp->list_node.next) {
# endif PC
for (formalp = formalist; formalp != TR_NIL;
formalp = formalp->list_node.next) {
formal = formalp->list_node.list;
if (formal == TR_NIL)
continue;
formal = formalp->list_node.list;
if (formal == TR_NIL)
continue;
* don't have types !?!
*/
typ = formal->pfunc_node.type;
* don't have types !?!
*/
typ = formal->pfunc_node.type;
if ( typ == TR_NIL ) {
if ( formal->tag != T_PPROC ) {
error("Types must be specified for arguments");
if ( typ == TR_NIL ) {
if ( formal->tag != T_PPROC ) {
error("Types must be specified for arguments");
}
} else {
if ( formal->tag == T_PPROC ) {
error("Procedures cannot have types");
}
} else {
if ( formal->tag == T_PPROC ) {
error("Procedures cannot have types");
} else {
p = gtype(typ);
}
} else {
p = gtype(typ);
}
- if (typ->tag == T_TYCARY) {
+ if (typ != TR_NIL && typ->tag == T_TYCARY) {
# ifdef OBJ
w = -even(lwidth(p->chain));
# ifndef DEC11
# ifdef OBJ
w = -even(lwidth(p->chain));
# ifndef DEC11
-static char sccsid[] = "@(#)lval.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)lval.c 5.2 (Berkeley) %G%";
#endif not lint
#include "whoami.h"
#endif not lint
#include "whoami.h"
return (i-1);
}
p = p->chain;
return (i-1);
}
p = p->chain;
+ if (p == NLNIL)
+ return (0);
if ((p->class != CRANGE) &&
(constsub = constval(el->list_node.list))) {
ap = con.ctype;
if ((p->class != CRANGE) &&
(constsub = constval(el->list_node.list))) {
ap = con.ctype;
-static char sccsid[] = "@(#)var.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)var.c 5.2 (Berkeley) %G%";
#endif not lint
#include "whoami.h"
#endif not lint
#include "whoami.h"
# else
(void) enter(defnl((char *) vidl->list_node.list, VAR, np, o2));
# endif
# else
(void) enter(defnl((char *) vidl->list_node.list, VAR, np, o2));
# endif
- if ( np -> nl_flags & NFILES ) {
+ if ( np != NLNIL && (np -> nl_flags & NFILES) ) {
dfiles[ cbn ] = TRUE;
}
# ifdef PC
dfiles[ cbn ] = TRUE;
}
# ifdef PC