SCCS-vsn: usr.bin/pascal/libpc/ASRT.c 1.3
SCCS-vsn: usr.bin/pascal/libpc/CHR.c 1.4
SCCS-vsn: usr.bin/pascal/libpc/LINO.c 1.3
SCCS-vsn: usr.bin/pascal/libpc/NIL.c 1.3
SCCS-vsn: usr.bin/pascal/libpc/RANG4.c 1.4
SCCS-vsn: usr.bin/pascal/libpc/RSNG4.c 1.4
SCCS-vsn: usr.bin/pascal/libpc/SUBSC.c 1.4
SCCS-vsn: usr.bin/pascal/libpc/SUBSCZ.c 1.4
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)ASRT.c 1.2 %G%";
+static char sccsid[] = "@(#)ASRT.c 1.3 %G%";
-#define NULL 0
-
-ASRT(cond, stmt)
+char EASRT[] = "Assertion failed\n";
- if (stmt != NULL) {
- ERROR("Assertion failed: %s\n", stmt);
- return;
- } else {
- ERROR("Assertion failed\n", 0);
- return;
- }
+ ERROR(EASRT, 0);
+ return;
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)CHR.c 1.3 %G%";
+static char sccsid[] = "@(#)CHR.c 1.4 %G%";
+char ECHR[] = "Argument to chr of %D is out of range\n";
- if (value < 0 || value > 127) {
- ERROR("Argument to chr of %D is out of range\n", value);
+ if (value > 127) {
+ ERROR(ECHR, value);
return;
}
return (char)value;
return;
}
return (char)value;
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)LINO.c 1.2 %G%";
+static char sccsid[] = "@(#)LINO.c 1.3 %G%";
+char ELINO[] = "Statement count limit of %D exceeded\n";
+
LINO()
{
if (++_stcnt >= _stlim) {
LINO()
{
if (++_stcnt >= _stlim) {
- ERROR("Statement count limit of %D exceeded\n", _stcnt);
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)NIL.c 1.2 %G%";
+static char sccsid[] = "@(#)NIL.c 1.3 %G%";
+char ENIL[] = "Pointer value out of legal range\n";
+
char *ptr; /* pointer to struct */
{
if (ptr > _maxptr || ptr < _minptr) {
char *ptr; /* pointer to struct */
{
if (ptr > _maxptr || ptr < _minptr) {
- ERROR("Pointer value out of legal range\n", 0);
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)RANG4.c 1.3 %G%";
+static char sccsid[] = "@(#)RANG4.c 1.4 %G%";
+char ERANG[] = "Value of %D is out of range\n";
long
RANG4(value, lower, upper)
long
RANG4(value, lower, upper)
long value;
long lower;
long upper;
{
if (value < lower || value > upper) {
long value;
long lower;
long upper;
{
if (value < lower || value > upper) {
- ERROR("Value of %D is out of range\n", value);
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)RSNG4.c 1.3 %G%";
+static char sccsid[] = "@(#)RSNG4.c 1.4 %G%";
+extern char ERANG[]; /* ERANG is defined in RANG4.c */
-
- long value;
- long upper;
+ long value;
+ unsigned long upper;
- if (value < 0 || value > upper) {
- ERROR("Value of %D is out of range\n", value);
+ if (value > upper) {
+ ERROR(ERANG, value);
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)SUBSC.c 1.3 %G%";
+static char sccsid[] = "@(#)SUBSC.c 1.4 %G%";
+char ESUBSC[] = "Subscript value of %D is out of range\n";
long
SUBSC(i, lower, upper)
long
SUBSC(i, lower, upper)
long i, lower, upper;
{
if (i < lower || i > upper) {
long i, lower, upper;
{
if (i < lower || i > upper) {
- ERROR("Subscript value of %D is out of range\n", i);
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)SUBSCZ.c 1.3 %G%";
+static char sccsid[] = "@(#)SUBSCZ.c 1.4 %G%";
+extern char ESUBSC[]; /* ESUBSC is defined in SUBSCZ.c */
-SUBSCZ(i, upper)
-
- long i, upper;
+SUBSCZ(value, upper)
+ long value;
+ unsigned long upper;
- if (i < 0 || i > upper) {
- ERROR("Subscript value of %D is out of range\n", i);
+ if (value > upper) {
+ ERROR(ESUBSC, value);