SCCS-vsn: usr.bin/pascal/pdx/sym/predicates.c 1.2
SCCS-vsn: usr.bin/pascal/pdx/sym/print.c 1.2
SCCS-vsn: usr.bin/pascal/pdx/sym/printval.c 1.2
/* Copyright (c) 1982 Regents of the University of California */
/* Copyright (c) 1982 Regents of the University of California */
-static char sccsid[] = "@(#)predicates.c 1.1 %G%";
+static char sccsid[] = "@(#)predicates.c 1.2 %G%";
/*
* The basic tests on a symbol.
/*
* The basic tests on a symbol.
#include "defs.h"
#include "sym.h"
#include "symtab.h"
#include "defs.h"
#include "sym.h"
#include "symtab.h"
#include "classes.h"
#include "sym.rep"
#include "classes.h"
#include "sym.rep"
(t2->class == SCAL || t2->class == CONST)) {
return TRUE;
}
(t2->class == SCAL || t2->class == CONST)) {
return TRUE;
}
+ if (t1->type == t_char && t1->class == ARRAY && t2->class == ARRAY) {
+ return TRUE;
+ }
}
/*
* A kludge here for "nil". Should be handled better.
}
/*
* A kludge here for "nil". Should be handled better.
return(FALSE);
} else {
t = rtype(s->type);
return(FALSE);
} else {
t = rtype(s->type);
- if (t == NIL || t->class == FILET) {
+ if (t == NIL || t->class == FILET || t->class == SET) {
return(FALSE);
} else {
return(TRUE);
return(FALSE);
} else {
return(TRUE);
/* Copyright (c) 1982 Regents of the University of California */
/* Copyright (c) 1982 Regents of the University of California */
-static char sccsid[] = "@(#)print.c 1.1 %G%";
+static char sccsid[] = "@(#)print.c 1.2 %G%";
/*
* Routines to print out symbols.
/*
* Routines to print out symbols.
addr = address(s, frame);
len = size(s);
}
addr = address(s, frame);
len = size(s);
}
- dread(sp, addr, len);
- sp += len;
printf("%s = ", s->symbol);
printf("%s = ", s->symbol);
- if (s->class == REF || s->class == VAR) {
- printval(s->type);
+ if (!rpush(addr, len)) {
+ printf("*** expression too large ***");
+ if (s->class == REF || s->class == VAR) {
+ printval(s->type);
+ } else {
+ printval(s);
+ }
/* Copyright (c) 1982 Regents of the University of California */
/* Copyright (c) 1982 Regents of the University of California */
-static char sccsid[] = "@(#)printval.c 1.1 %G%";
+static char sccsid[] = "@(#)printval.c 1.2 %G%";
/*
* Print out the value at the top of the stack using the given type.
/*
* Print out the value at the top of the stack using the given type.
if (t==t_char || (t->class==RANGE && t->type==t_char)) {
len = size(s);
sp -= len;
if (t==t_char || (t->class==RANGE && t->type==t_char)) {
len = size(s);
sp -= len;
+ printf("'%.*s'", len, sp);
break;
} else {
printarray(s);
break;
} else {
printarray(s);