[ADD] conf deplate, and test viki.
[arrow.git] / ncurses / scanw.c
blob07d35478b333bbb841f6e35672169c6fea1942db
1 /* copyleft (C) GPL3 {{{2
2 * Filename: scanw.c
4 * Author: arrow <arrow_zhang@sdc.sercomm.com>
5 * Created at: Tue Jan 8 21:19:42 2008
6 * }}}*/
7 /*header files {{{1*/
8 #include <ncurses.h>
9 #include <string.h>
10 #include "debug.h"
11 /*}}}*/
13 /*declaration {{{1*/
14 /*}}}*/
16 /*functions {{{1*/
17 int main(int argc, char *argv[])
19 char mesg[] = "Enter a string:";
20 char str[80];
21 int row, col;
23 initscr();
24 getmaxyx(stdscr, row, col);
25 mvprintw(row/2, (col - strlen(mesg))/2, "%s", mesg);
26 getstr(str);
27 mvprintw(LINES - 2, 0, "You Entered: %s", str);
28 getch();
29 endwin();
31 return 0;
34 /* vim:fdm=marker:ts=8:ft=c:norl:fdl=1:
35 * }}}*/