projects
/
unix-history
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
BSD 4_1c_2 release
[unix-history]
/
usr
/
src
/
ucb
/
pascal
/
pxp
/
lab.c
static char
*
sccsid
=
"@(#)lab.c 1.1 (Berkeley) 3/2/81"
;
/* Copyright (c) 1979 Regents of the University of California */
#
/*
* pxp - Pascal execution profiler
*
* Bill Joy UCB
* Version 1.2 January 1979
*/
#include
"0.h"
/*
* Label declaration part
*/
label
(
r
,
l
)
int
*
r
,
l
;
{
register
*
ll
;
if
(
nodecl
)
printoff
();
puthedr
();
setline
(
l
);
ppnl
();
indent
();
ppkw
(
"label"
);
ppgoin
(
DECL
);
ppnl
();
indent
();
ppbra
(
NIL
);
ll
=
r
;
if
(
ll
!=
NIL
)
for
(;;) {
pplab
(
ll
[
1
]);
ll
=
ll
[
2
];
if
(
ll
==
NIL
)
break
;
ppsep
(
", "
);
}
else
ppid
(
"{label list}"
);
ppket
(
";"
);
putcml
();
ppgoout
(
DECL
);
}
/*
* Goto statement
*/
gotoop
(
s
)
char
*
s
;
{
gocnt
++;
ppkw
(
"goto"
);
ppspac
();
pplab
(
s
);
}
/*
* A label on a statement
*/
labeled
(
s
)
char
*
s
;
{
linopr
();
indentlab
();
pplab
(
s
);
ppsep
(
":"
);
}