diff --git a/lib/graph.c b/lib/graph.c new file mode 100644 index 0000000..4924733 --- /dev/null +++ b/lib/graph.c @@ -0,0 +1,54 @@ +#include + +// void init_colors() { +// start_color(); +// init_pair(1, COLOR_GREEN, COLOR_BLACK); +// init_pair(2, COLOR_CYAN, COLOR_BLACK); +// init_pair(3, COLOR_MAGENTA, COLOR_BLACK); +// init_pair(4, COLOR_YELLOW, COLOR_BLACK); +// } + +// int main(void) { +// initscr(); +// printw("Goodbye World..."); +// refresh(); +// getch(); +// endwin(); + +// return 0; +// } + +int main(void) { + initscr(); + raw(); + // cbreak(); + // noecho(); + // echo(); + // curs_set(0); + keypad(stdscr, TRUE); // enable F1, F2, etc + noecho(); + // nodelay(stdscr, TRUE); + + // getmaxyx(stdscr, max_y, max_x); + // init_colors(); + printw("Type: "); + refresh(); + + int ch; + while (1) { + ch = getch(); + if (ch == KEY_F(1)) { + printw("[!] F1\n"); + break; + } + + attron(A_BOLD); + printw("%c", ch); + attroff(A_BOLD); + refresh(); + // napms(50); + } + + endwin(); + return 0; +} diff --git a/lib/graph.h b/lib/graph.h new file mode 100644 index 0000000..f72bbc6 --- /dev/null +++ b/lib/graph.h @@ -0,0 +1,6 @@ +#ifndef DORNE_GRAPH_H +#define DORNE_GRAPH_H + + + +#endif /* DORNE_GRAPH_H */