Annotation of coherent/b/lib/libc/XSTDIO/fopen.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * libc/stdio/fopen.c
        !             3:  * ANSI-compliant C standard i/o library.
        !             4:  * fopen()
        !             5:  * ANSI 4.9.5.3.
        !             6:  * Open file with first available stream.
        !             7:  */
        !             8: 
        !             9: #include <stdio.h>
        !            10: 
        !            11: FILE *
        !            12: fopen(filename, mode) const char *filename, *mode;
        !            13: {
        !            14:        register FILE **fpp;
        !            15: 
        !            16:        for (fpp = &_fp[0]; fpp < &_fp[_NFILE]; fpp++)
        !            17:                if (*fpp==NULL || !((*fpp)->_ff2 & _FINUSE))
        !            18:                        return (*fpp = _fopen(filename, mode, *fpp, -1));
        !            19:        return NULL;
        !            20: }
        !            21: 
        !            22: /* 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.