Annotation of coherent/b/lib/libc/stdio/fopen.c, revision 1.1.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: #include "stdio.int.h"
                     11: 
                     12: FILE *
                     13: fopen(filename, mode) const char *filename, *mode;
                     14: {
                     15:        register FILE **fpp;
                     16: 
                     17:        for (fpp = &_fp[0]; fpp < &_fp[_NFILE]; fpp++)
                     18:                if (*fpp==NULL || !((*fpp)->_ff2 & _FINUSE))
                     19:                        return (*fpp = _fopen(filename, mode, *fpp, -1));
                     20:        return NULL;
                     21: }
                     22: 
                     23: /* 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.