11966f609420ca0b3365b575ea41797f9d87ac92
/* Copyright (c) 1979 Regents of the University of California */
static char sccsid
[] = "@(#)utilities.c 1.1 %G%";
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
);
"\n%1ld statements executed in %04.2f seconds cpu time.\n",
register struct disp
*mydp
;
register struct stack
*ap
;
struct disp disp
[MAXLVL
];
fputs("Program was not executed.\n",stderr
);
fputs("\n\tInterrupted in \"",stderr
);
else if (errnum
== PHALT
)
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
);
PMFLUSH(_cntrs
, _rtns
, _pcpcount
);
fputs("Execution terminated",stderr
);
fputs(" abnormally",stderr
);