Ejemplo n.º 1
0
void    WriteErr( int errcode, va_list args ) {
//=============================================

// Write error message.

    char        buffer[ERR_PREF_SIZE+ERR_BUFF_SIZE+1];

    _AccessFIO();
    // Before writing the error message, flush standard output files so that if
    // unit 6 is connected to the standard output device which has been
    // redirected to a file, the file gets flushed before the error message is
    // written.
    FlushStdUnit();
    strcpy( buffer, ErrorPref );
    BldErrCode( errcode, &buffer[ ERR_PREF_SIZE ] );
    __BldErrMsg( errcode, &buffer[ERR_PREF_SIZE + ERR_CODE_SIZE], args );
    if( __EnterWVIDEO( buffer ) ) {
        StdBuffer();
    } else {
        StdBuffer();
        StdWriteNL( buffer, strlen( buffer ) );
    }
    ERR_HOOK( errcode, buffer );
    StdFlush();
    _ReleaseFIO();
}
Ejemplo n.º 2
0
void    MsgBuffer( uint msg, char *buff, ...  ) {
// Format message to buffer.
    va_list     args;

    va_start( args, buff );
    __BldErrMsg( msg, buff, args );
    va_end( args );
}
Ejemplo n.º 3
0
static  void    PrintMsg( uint msg, ... ) {
//=========================================

    va_list     args;
    char        buff[LIST_BUFF_SIZE+1];

    va_start( args, msg );
    __BldErrMsg( msg, buff, args );
    va_end( args );
    puts( &buff[1] ); // skip leading blank
}
Ejemplo n.º 4
0
void    MsgJustErr( uint msg, ...  ) {
//====================================

// Display message to error file.

    char        msgbuff[ERR_BUFF_SIZE+1];
    va_list     args;

    va_start( args, msg );
    __BldErrMsg( msg, msgbuff, args );
    va_end( args );
    JustErr( msgbuff );
}
Ejemplo n.º 5
0
void    MsgPrintErr( uint msg, ...  ) {
//=====================================

// Display message to the error and listing file.

    char        msgbuff[LFERR_BUFF_SIZE+1];
    va_list     args;

    va_start( args, msg );
    __BldErrMsg( msg, msgbuff, args );
    va_end( args );
    PrintErr( msgbuff );
}
Ejemplo n.º 6
0
void    MsgPrtLstNL( uint msg, ... ) {
//====================================

// Display message to the listing file.

    char        msgbuff[LIST_BUFF_SIZE+1];
    va_list     args;

    va_start( args, msg );
    __BldErrMsg( msg, msgbuff, args );
    va_end( args );
    PrtLstNL( msgbuff );
}