Annotation of researchv10no/cmd/cfront/libC/ooiostream/swstdio.c, revision 1.1.1.1

1.1       root        1: /*ident        "@(#)ctrans:lib/stream/swstdio.c        1.1.1.1" */
                      2: /**************************************************************************
                      3:                        Copyright (c) 1984 AT&T
                      4:                          All Rights Reserved   
                      5: 
                      6:        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
                      7:        
                      8:        The copyright notice above does not evidence any        
                      9:        actual or intended publication of such source code.
                     10: 
                     11: swstdio.c:
                     12: 
                     13: *****************************************************************************/
                     14: 
                     15: 
                     16: #include <iostream.h>
                     17: #include <stdiostream.h>
                     18: 
                     19: void ios::sync_with_stdio() 
                     20: {
                     21:        switch ( Iostream_init::stdstatus )
                     22:        {
                     23:        case 1 : cout.flush() ; cerr.flush() ; clog.flush() ; break ;
                     24:        case 2 : break ;
                     25:        default : return ; }
                     26:  
                     27:        cin = new stdiobuf(stdin) ;
                     28:        cout = new stdiobuf(stdout) ;
                     29:        cerr = new stdiobuf(stderr) ;
                     30:        clog = cerr ;
                     31:        cin.rdbuf()->setbuf((char*)0,0) ;
                     32:        cout.rdbuf()->setbuf((char*)0,0) ;
                     33:        cerr.rdbuf()->setbuf((char*)0,0) ;
                     34:        clog.rdbuf()->setbuf((char*)0,0) ;
                     35:        cin.skip(1) ;
                     36:        cin.tie(&cout) ;
                     37:        cerr.tie(&cout) ;
                     38:        clog.tie(&cout) ;
                     39:        Iostream_init::stdstatus = 2 ;
                     40:        }

unix.superglobalmegacorp.com

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