File:  [Research Unix] / researchv10no / cmd / lcomp / nexit.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:35 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

#include "stdio.h"
struct rec {
	long len;
	struct rec *next;
	char *fname;
	long cnt[1];
} *proFptr = (struct rec *)-1;	/* end of list marker */
exit(n)
{	int i;
	char xbuf[4096];
	setbuf(stderr, xbuf);
	if(freopen("prof.out", "a", stderr) == 0)
		_cleanup(), _exit(n+1);
	while(proFptr != (struct rec *)-1) {
		fprintf(stderr, "%s\n", proFptr->fname);
		for(i = 3; i < proFptr->len; i++)
			fprintf(stderr, "%d\n", proFptr->cnt[i-3], i);
		proFptr = proFptr->next;
	}
	fflush(stderr);
	_cleanup();
	_exit(n);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.