Пример #1
0
void
ReadTable_Tab ( ReadLiner * rl ) // '\t':
{
    if ( AtCommandLine ( rl ) )
    {
        ReadLine_TabWordCompletion ( rl ) ;
    }
    else ReadLine_SaveCharacter ( rl ) ;
}
Пример #2
0
void
ReadLine_GetLine ( ReadLiner * rl )
// we're here until we get a newline char ( '\n' or '\r' ), a eof or a buffer overflow
// note : ReadLinePad [ 0 ] starts after the prompt ( "-: " | "> " ) and doesn't include them
{
    ReadLine_RunInit ( rl ) ;
    rl->LineStartFileIndex = rl->InputStringIndex ;
    while ( ! ReadLiner_IsDone ( rl ) )
    {
        ReadLine_Key ( rl ) ;
        if ( AtCommandLine ( rl ) ) _ReadLine_TabCompletion_Check ( rl ) ;
        _CfrTil_->ReadLine_FunctionTable [ _CfrTil_->ReadLine_CharacterTable [ rl->InputKeyedCharacter ] ] ( rl ) ;
        ReadLiner_SetState ( rl, ANSI_ESCAPE, false ) ;
        SetBuffersUnused ;
    }
}