#include "kshell.h"#include <ctype.h>#include <stddef.h>#include "console.h"#include "io.h"#include "keyboard.h"#include "keymap.h"#include "kshell_cmds.h"#include "string.h"Macros | |
| #define | KSHELL_MAX_ARGS 64 |
| The maximum number of arguments. | |
| #define | KSHELL_MAX_ARG_LEN 256 |
| The maximum length of an argument. | |
| #define | KSHELL_MAX_LINE_LEN 80 |
| The maximum length of a command line. | |
| #define | KSHELL_MAX_HISTORY_LEN 1000 |
| The shell's maximum history length. | |
Functions | |
| static void | parse_cmd (putchar putc, char *line) |
| Processes a line. | |
| static void | process_line (putchar putc) |
| Reads a line and processes it. | |
| void | shell_loop (putchar putc) |
| Runs the shell loop. | |
| void | putchars (putchar putc, const char *str) |
| Writes a string of characters to the console. | |
Variables | |
| static const char * | WHITESPACES = " \t\n\r" |
| static char | kshell_history [KSHELL_MAX_HISTORY_LEN] |
| static uint16_t | kshell_history_length = 0 |
| #define KSHELL_MAX_ARG_LEN 256 |
The maximum length of an argument.
| #define KSHELL_MAX_ARGS 64 |
The maximum number of arguments.
| #define KSHELL_MAX_HISTORY_LEN 1000 |
The shell's maximum history length.
| #define KSHELL_MAX_LINE_LEN 80 |
The maximum length of a command line.
|
static |
Processes a line.
| putc | The putchar function. |
| line | Line to be parsed. |
|
static |
Reads a line and processes it.
| putc | The putchar function. |
| void putchars | ( | putchar | putc, |
| const char * | str | ||
| ) |
Writes a string of characters to the console.
| putc | The putchar function. |
| str | String to be written. |
| void shell_loop | ( | void(*)(char) | putc | ) |
Runs the shell loop.
| putc | The putchar function. |
|
static |
|
static |
|
static |