blob: 60d5a69dfa33bf65bb1f55bf7b96fe77c0ad1de3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#include <terminal/terminal.h>
#include <terminal/readline.h>
#include <libfont/fonts.h>
#include <knob/format.h>
#include <knob/heap.h>
#include <knob/task.h>
#include "cmds.h"
#include "line.h"
#define FONT_NAME "berry"
void main(const char *arg) {
struct font_info *f = get_font(FONT_NAME);
if (!f)
return;
active_term = make_term(f, 50, 18);
if (!active_term)
return;
source(*arg ? arg : "user/default.rc");
ensure_color();
term_add_sz("Portland Highway\nType \"help\" for help.\n");
paint_term();
char cmd_buf[128];
while (1) {
read_line(cmd_buf, 127, "> ");
run_line(cmd_buf);
}
}
|