Exemplo n.º 1
0
short TSystemError::sysErr( short errorCode, uchar drive )
{
    ushort c = ( (TScreen::screenMode & 0x00FF) != TDisplay::smMono  ) ?
                                        sysColorAttr : sysMonoAttr;
    char s[ 63 ];
    TDrawBuffer b;

//  bug-fix TV2B-31 ---------------------------------------
    /* There are 22 documented device errors, all of which have their
     * own strings in errorString[].  However, just in case we run into
     * something weird this will prevent a crash.
     */
//  end of bug-fix. ---------------------------------------
    if( errorCode < (sizeof(errorString) / sizeof(errorString[0])) )
        sprintf( s, errorString[ errorCode ], drive + 'A' );
    else
        sprintf( s, "Unknown critical error %d on drive %c", errorCode, drive + 'A' );

// modification #TV2N-04 ----------------------------------
    // EFW - Modified to be screen size aware.
    b.moveChar( 0, ' ', c, TScreen::screenWidth);
    b.moveCStr( 1, s, c);
    b.moveCStr( TScreen::screenWidth - cstrlen(sRetryOrCancel) - 1,
        sRetryOrCancel, c);
// end of modification ------------------------------------
    swapStatusLine(b);
    int res = selectKey();
    swapStatusLine(b);
    return res;
}
Exemplo n.º 2
0
short TSystemError::sysErr( short errorCode, uchar drive )
{
    ushort c = ( (TScreen::screenMode & 0x00fF) != TDisplay::smMono  ) ?
                                        sysColorAttr : sysMonoAttr;
    char s[ 63 ];
    TDrawBuffer b;

    sprintf( s, errorString[ errorCode ], drive + 'a' );

    b.moveChar( 0, ' ', c, 80);
    b.moveCStr( 1, s, c);
    b.moveCStr( 79-cstrlen(sRetryOrCancel), sRetryOrCancel, c);
    swapStatusLine(b);
    int res = selectKey();
    swapStatusLine(b);
    return res;
}
Exemplo n.º 3
0
short TSystemError::sysErr( short errorCode, uchar drive )
{
    ushort c = ( (TScreen::screenMode & 0x00FF) != TDisplay::smMono  ) ?
                                        sysColorAttr : sysMonoAttr;
    char s[ 63 ];
    TDrawBuffer b;

    /* There are 16 documented device errors, all of which have their
     * own strings in errorString[].  However, just in case we run into
     * something weird this will prevent a crash.
     */
    if( errorCode < (sizeof(errorString) / sizeof(errorString[0])) )
        sprintf( s, errorString[ errorCode ], drive + 'A' );
    else
        sprintf( s, "Unknown critical error %d on drive %c", errorCode, drive + 'A' );

    b.moveChar( 0, ' ', c, 80);
    b.moveCStr( 1, s, c);
    b.moveCStr( 79-cstrlen(sRetryOrCancel), sRetryOrCancel, c);
    swapStatusLine(b);
    int res = selectKey();
    swapStatusLine(b);
    return res;
}