Skip to content

Commit

Permalink
New Direction
Browse files Browse the repository at this point in the history
I think I'm doing this now using c and ncurses.
So, I've got a c file that make a new screen and accepts up to 3 characters.

Also, a makefile.
  • Loading branch information
psycotica0 committed Dec 4, 2008
1 parent 056d9e2 commit a1490ab
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Makefile
@@ -0,0 +1,16 @@
menu: menu.o
gcc -lncurses -o menu menu.o

menu.o: menu.c
gcc -c -o menu.o menu.c

.PHONY: clean test run

clean:
rm -f menu
rm -f menu.o

test: run clean

run: menu
./menu
13 changes: 13 additions & 0 deletions menu.c
@@ -0,0 +1,13 @@
#include <ncurses.h>

int main () {
initscr();
char inp[4];

getnstr(&inp,3);
inp[3]='\0';

endwin();
printf("You typed: %s\n",inp);
return 0;
}

0 comments on commit a1490ab

Please sign in to comment.