File:  [Net/2] / Net2 / tests / benchmarks / countenv.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 18:03:54 2018 UTC (8 years, 3 months ago) by root
Branches: MAIN, CSRG
CVS tags: Net2, HEAD
Net/2

/*
 * Benchmark utility to sum up
 * the total number of bytes passed
 * in the environment on an exec.
 */

main(argc, argv, envp)
	char *argv[], *envp[];
{
	register char **p;
	register int n;

	n = 0;
	for (p = envp; *p && *p != (char *)-1; p++)
		n += strlen(*p);
	printf("%d bytes\n", n);
	exit(0);
}

unix.superglobalmegacorp.com

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