diff options
author | EliteTK <tomasz.kramkowski@gmail.com> | 2014-10-07 23:35:09 +0100 |
---|---|---|
committer | EliteTK <tomasz.kramkowski@gmail.com> | 2014-10-07 23:35:09 +0100 |
commit | bf4148f4351584bc97b26d8efc7bea74c2ab1b8a (patch) | |
tree | b4aac44a189f0bb911541dc24c4c3d2cf0ee410a /ncurses.c | |
parent | ef043cbc02c3c55ef175b83e7c5e4d2b82d0007b (diff) | |
download | c-stuff-bf4148f4351584bc97b26d8efc7bea74c2ab1b8a.tar.gz c-stuff-bf4148f4351584bc97b26d8efc7bea74c2ab1b8a.tar.xz c-stuff-bf4148f4351584bc97b26d8efc7bea74c2ab1b8a.zip |
Added GPL header to files (which I'm mostly sure I wrote) Resolves #1
Diffstat (limited to 'ncurses.c')
-rw-r--r-- | ncurses.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/ncurses.c b/ncurses.c deleted file mode 100644 index ad7dced..0000000 --- a/ncurses.c +++ /dev/null @@ -1,32 +0,0 @@ -#include <ncurses.h> - -int main() -{ - int ch; - - initscr(); /* Start curses mode */ - raw(); /* Line buffering disabled */ - keypad(stdscr, TRUE); /* We get F1, F2 etc.. */ - noecho(); /* Don't echo() while we do getch */ - - printw("Type any character to see it in bold\n"); - ch = getch(); /* If raw() hadn't been called - * we have to press enter before it - * gets to the program */ - if(ch == KEY_F(1)) /* Without keypad enabled this will */ - printw("F1 Key pressed");/* not get to us either */ - /* Without noecho() some ugly escape - * charachters might have been printed - * on screen */ - else - { printw("The pressed key is "); - attron(A_BOLD); - printw("%c", ch); - attroff(A_BOLD); - } - refresh(); /* Print it on to the real screen */ - getch(); /* Wait for user input */ - endwin(); /* End curses mode */ - - return 0; -} |