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

/*
 * libc/stdio/fopen.c
 * ANSI-compliant C standard i/o library.
 * fopen()
 * ANSI 4.9.5.3.
 * Open file with first available stream.
 */

#include <stdio.h>
#include "stdio.int.h"

FILE *
fopen(filename, mode) const char *filename, *mode;
{
	register FILE **fpp;

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

/* end of libc/stdio/fopen.c */

unix.superglobalmegacorp.com

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