示例#1
0
int ostream::do_opfx() {
/*******************/
// Prefix to all ostream activities.
// Return a 0 (fail) if an error state is set.

    __lock_it( __i_lock );
    if( tie() != NULL ) {
        tie()->flush();
    }
    if( flags() & ios::stdio ) {
        ::__flush( __get_std_stream( STDOUT_FILENO ) );
        ::__flush( __get_std_stream( STDERR_FILENO ) );
    }
    return( good() );
}
示例#2
0
void __rterrmsg( int errcode, const char *funcname )
{
    FILE    *fp;

    fp = __get_std_stream( STDERR_FILENO );
    fputs( Msgs[errcode], fp );
    fputs( " in ", fp );
    fputs( funcname, fp );
    fputc( '\n', fp );
}