projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new copyright; att/bsd/shared
[unix-history]
/
usr
/
src
/
usr.bin
/
pascal
/
src
/
fdec.c
diff --git
a/usr/src/usr.bin/pascal/src/fdec.c
b/usr/src/usr.bin/pascal/src/fdec.c
index
0f40206
..
64301c8
100644
(file)
--- a/
usr/src/usr.bin/pascal/src/fdec.c
+++ b/
usr/src/usr.bin/pascal/src/fdec.c
@@
-1,6
+1,13
@@
-/* Copyright (c) 1979 Regents of the University of California */
+/*-
+ * Copyright (c) 1980 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.redist.c%
+ */
-static char sccsid[] = "@(#)fdec.c 1.23 %G%";
+#ifndef lint
+static char sccsid[] = "@(#)fdec.c 5.2 (Berkeley) %G%";
+#endif /* not lint */
#include "whoami.h"
#include "0.h"
#include "whoami.h"
#include "0.h"
@@
-19,7
+26,7
@@
int bodycnts[ DSPLYSZ ];
#ifdef PC
# include "pc.h"
#ifdef PC
# include "pc.h"
-# include
"pcops.h"
+# include
<pcc.h>
#endif PC
#ifdef OBJ
#endif PC
#ifdef OBJ
@@
-37,7
+44,6
@@
funcfwd(fp)
if ( monflg ) {
fp -> value[ NL_CNTR ] = bodycnts[ cbn ];
}
if ( monflg ) {
fp -> value[ NL_CNTR ] = bodycnts[ cbn ];
}
- return (fp);
}
/*
}
/*
@@
-48,6
+54,7
@@
funcfwd(fp)
* otherwise.
*/
* otherwise.
*/
+struct nl *
funcext(fp)
struct nl *fp;
{
funcext(fp)
struct nl *fp;
{
@@
-87,10
+94,11
@@
funcext(fp)
* of the (function) and parameters
* into the symbol table.
*/
* of the (function) and parameters
* into the symbol table.
*/
+struct nl *
funcbody(fp)
struct nl *fp;
{
funcbody(fp)
struct nl *fp;
{
- register struct nl *q
, *p
;
+ register struct nl *q;
cbn++;
if (cbn >= DSPLYSZ) {
cbn++;
if (cbn >= DSPLYSZ) {
@@
-113,7
+121,7
@@
funcbody(fp)
fp->ptr[2] = nlp;
if (fp->class != PROG) {
for (q = fp->chain; q != NIL; q = q->chain) {
fp->ptr[2] = nlp;
if (fp->class != PROG) {
for (q = fp->chain; q != NIL; q = q->chain) {
- enter(q);
+
(void)
enter(q);
# ifdef PC
q -> extra_flags |= NPARAM;
# endif PC
# ifdef PC
q -> extra_flags |= NPARAM;
# endif PC
@@
-123,7
+131,7
@@
funcbody(fp)
/*
* For functions, enter the fvar
*/
/*
* For functions, enter the fvar
*/
- enter(fp->ptr[NL_FVAR]);
+
(void)
enter(fp->ptr[NL_FVAR]);
# ifdef PC
q = fp -> ptr[ NL_FVAR ];
if (q -> type != NIL ) {
# ifdef PC
q = fp -> ptr[ NL_FVAR ];
if (q -> type != NIL ) {
@@
-154,11
+162,11
@@
funcbody(fp)
*/
segend()
{
*/
segend()
{
+#ifdef PC
register struct nl *p;
register int i,b;
char *cp;
register struct nl *p;
register int i,b;
char *cp;
-#ifdef PC
if ( monflg ) {
error("Only the module containing the \"program\" statement");
cerror("can be profiled with ``pxp''.\n");
if ( monflg ) {
error("Only the module containing the \"program\" statement");
cerror("can be profiled with ``pxp''.\n");
@@
-172,8
+180,8
@@
funcbody(fp)
for (p = disptab[i]; p != NIL && (p->nl_block & 037) == b; p = p->nl_next) {
switch (p->class) {
case BADUSE:
for (p = disptab[i]; p != NIL && (p->nl_block & 037) == b; p = p->nl_next) {
switch (p->class) {
case BADUSE:
- cp =
's'
;
- if (
p->chain
->ud_next == NIL)
+ cp =
"s"
;
+ if (
((struct udinfo *) (p->chain))
->ud_next == NIL)
cp++;
eholdnl();
if (p->value[NL_KINDS] & ISUNDEF)
cp++;
eholdnl();
if (p->value[NL_KINDS] & ISUNDEF)
@@
-181,7
+189,7
@@
funcbody(fp)
else
nerror("%s improperly used on line%s", p->symbol, cp);
pnumcnt = 10;
else
nerror("%s improperly used on line%s", p->symbol, cp);
pnumcnt = 10;
- pnums(
p->chain
);
+ pnums(
(struct udinfo *) (p->chain)
);
pchr('\n');
break;
pchr('\n');
break;
@@
-252,7
+260,9
@@
pnums(p)
printf(" %d", p->ud_line);
}
printf(" %d", p->ud_line);
}
+/*VARARGS*/
nerror(a1, a2, a3)
nerror(a1, a2, a3)
+ char *a1,*a2,*a3;
{
if (Fp != NIL) {
{
if (Fp != NIL) {