PKUOS - Pintos
Pintos source browser for PKU Operating System course
|
Go to the source code of this file.
Functions | |
static void | read_line (char line[], size_t size) |
Reads a line of input from the user into LINE, which has room for SIZE bytes. More... | |
static bool | backspace (char **pos, char line[]) |
If *POS is past the beginning of LINE, backs up one character position. More... | |
int | main (void) |
|
static |
If *POS is past the beginning of LINE, backs up one character position.
Returns true if successful, false if nothing was done.
Definition at line 92 of file shell.c.
References printf().
Referenced by read_line().
int main | ( | void | ) |
|
static |
Reads a line of input from the user into LINE, which has room for SIZE bytes.
Handles backspace and Ctrl+U in the ways expected by Unix users. On return, LINE will always be null-terminated and will not end in a new-line character.
< Ctrl+U.
Definition at line 52 of file shell.c.
References backspace(), putchar(), read(), and STDIN_FILENO.
Referenced by main().