File:  [MW Coherent from dump] / coherent / d / lib / libc / stdio / fopen.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:38 2019 UTC (7 years, 2 months ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

/*
 * Standard I/O Library
 * open file with first available structure
 */

#include <stdio.h>

FILE *
fopen(name, type)
char	*name, *type;
{
	register FILE	**fpp;
	extern	FILE	*_fopen();

	for (fpp = &_fp[0]; fpp < &_fp[_NFILE]; fpp++)
		if (*fpp==NULL || !((*fpp)->_ff&_FINUSE))
			return (*fpp = _fopen(name, type, *fpp, -1));
	return (NULL);
}

unix.superglobalmegacorp.com

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