Modified pc_terminal.c