summaryrefslogtreecommitdiff
path: root/emumon.c
blob: a24a5c5d2afa44b1e68da69d28b8bc4230b6387f (plain)
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
37
38
39
40
41
42
43
44
45
46
47
#include "sux.h"
#include <assert.h>
#include <ctype.h>
#include <string.h>


void init_win(WINDOW *w) {
	init_screen();
	box(w, 0, 0);
	nodelay(w, 0);
	crmode();
	noecho();
	nl();
	keypad(w, 1);
	curs_set(1);
	werase(w);
	scrollok(w, 1);
	start_color();
	use_default_colors();
	init_pair(1, COLOR_WHITE, -1);
	attron(COLOR_PAIR(1) | A_BOLD);
	wmove(w, 0, 0);
}

int handle_char(int c) {

}

void emumon(WINDOW *w) {
	init_win(w);
	curs_set(0);
	wprintw(w, "Welcome to the debug monitor for CISC 0.2.\n");
	wprintw(w, "To get more info, type 'help'.\n");
	int done = 0;
	int row = 0;
	int col = 0;
	int insert = 1; /* Insert mode flag. */
	while (!done) {
		wmove(w, row, col);
		wrefresh(w);
		curs_set(1);
		int c = wgetch(w);
		curs_set(0);
		handle_char(c);
	}

}