Annotation of researchv10no/libc/stdio/fprintf.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * pANS stdio -- fprintf
        !             3:  */
        !             4: #include "iolib.h"
        !             5: 
        !             6: #ifdef V10
        !             7: #define flags _flag
        !             8: #define buf _base
        !             9: #else
        !            10: #endif
        !            11: 
        !            12: int fprintf(FILE *f, const char *fmt, ...){
        !            13:        int n;
        !            14:        va_list args;
        !            15:        char buff[BUFSIZ];
        !            16: 
        !            17:        if (f->flags & _IONBF)
        !            18:                setbuf(f, buff);
        !            19:        va_start(args, fmt);
        !            20:        n=vfprintf(f, fmt, args);
        !            21:        va_end(args);
        !            22:        if ((char *)f->buf == buff) {
        !            23:                fflush(f);
        !            24:                setbuf(f, NULL);
        !            25:                }
        !            26:        return n;
        !            27: }

unix.superglobalmegacorp.com

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