|
|
@ -1,10 +1,13 @@ |
|
|
|
#include <stdlib.h> |
|
|
|
#include <stdlib.h> |
|
|
|
#include <ncurses.h> |
|
|
|
#include <ncurses.h> |
|
|
|
|
|
|
|
#include "extras.h" |
|
|
|
|
|
|
|
|
|
|
|
int main(int argc,char**argv) { |
|
|
|
int main(int argc,char**argv) { |
|
|
|
int rows,cols; |
|
|
|
int rows,cols; |
|
|
|
|
|
|
|
|
|
|
|
initscr(); |
|
|
|
initscr(); |
|
|
|
|
|
|
|
start_color(); |
|
|
|
|
|
|
|
init_pair(1,COLOR_RED,COLOR_BLACK); |
|
|
|
getmaxyx(stdscr,rows,cols); |
|
|
|
getmaxyx(stdscr,rows,cols); |
|
|
|
raw(); |
|
|
|
raw(); |
|
|
|
keypad(stdscr,TRUE); |
|
|
|
keypad(stdscr,TRUE); |
|
|
@ -16,11 +19,13 @@ int main(int argc,char**argv) { |
|
|
|
addch(ACS_BLOCK); |
|
|
|
addch(ACS_BLOCK); |
|
|
|
addch(ACS_BSBS); |
|
|
|
addch(ACS_BSBS); |
|
|
|
addch(ACS_BTEE); |
|
|
|
addch(ACS_BTEE); |
|
|
|
|
|
|
|
addch(' '); |
|
|
|
|
|
|
|
writeExtras(); |
|
|
|
mvaddch(5,17,ACS_DARROW); |
|
|
|
mvaddch(5,17,ACS_DARROW); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
attron(COLOR_PAIR(1)); |
|
|
|
mvprintw(4,7,"There are %dx%d squares.",rows,cols); |
|
|
|
mvprintw(4,7,"There are %dx%d squares.",rows,cols); |
|
|
|
|
|
|
|
attroff(COLOR_PAIR(1)); |
|
|
|
mvchgat(4,10,4,A_REVERSE,0,NULL); |
|
|
|
|
|
|
|
refresh(); |
|
|
|
refresh(); |
|
|
|
getch(); |
|
|
|
getch(); |
|
|
|
endwin(); |
|
|
|
endwin(); |
|
|
|