/* Copyright (c) 1979 Regents of the University of California */
static char sccsid
[] = "@(#)stats.c 4.1 10/10/80";
#define HZ 60 /* interrupt frequency */
register struct stack
**mydp
, *ap
;
struct stack
**dp
, *disp
[20];
fputs("\n\tInterrupted in \"",stderr
);
else if (errnum
== EHALT
)
fputs("\n\tHalted in \"",stderr
);
fputs("\n\tError in \"",stderr
);
i
= linum
- (((ap
)->entry
)->offset
& 0177777);
fprintf(stderr
,"%s\"",(ap
->entry
)->name
);
fprintf(stderr
,"+%1d near line %1d.",i
,linum
);
if (mydp
<= &display
[1]){
fputs("\tCalled by \"",stderr
);
datafile
= fopen(proffile
,"r");
count
= fread(&profdata
,sizeof(profdata
),1,datafile
);
for (count
= 0; count
< numops
; count
++)
profdata
.counts
[count
] = 0.0;
profdata
.startdate
= time(0);
for (count
= 0; count
< numops
; count
++)
profdata
.counts
[count
] += profcnts
[count
];
profdata
.usrtime
+= tbuf
.usr_time
;
profdata
.systime
+= tbuf
.sys_time
;
datafile
= freopen(proffile
,"w",datafile
);
fwrite(&profdata
,sizeof(profdata
),1,datafile
);
fprintf(stderr
,"\n%1ld statements executed in %04.2f seconds cpu time.\n",