src/terminal_functions.c
/*
 * Waiting for a single key press, and then returning it. 
 */
Waiting for a single key press, and then returning it.
Waiting for a single key press and then returning it .
char editor_read_key()
{
    char c;
    int read_status = 0; 
    while(( read_status==read(STDIN_FILENO, &c, 1) )!=1)
    {
        if(read_status == -1 && errno != EAGAIN)
            error("read failed"); 
    }
    return c; 
}
char editor_read_key ( ) { char c ; int read_status = 0 ; while ( ( read_status == read ( STDIN_FILENO , & c , 1 ) ) != 1 ) { if ( read_status == -1 && errno != EAGAIN ) error ( " " ) ; } return c ; }
Waiting for a single key press, and then returning it.
Waiting for a single key press and then returning it .