#include <ncurses.h>
//#include <ncursesw/curses.h>
#include <locale.h>

#include <pthread.h>

void draw40x25box(){
	int ncol=40;
	int nrow=25;
	int col,row;
	for (row=0;row<nrow;row++){
		for (col=0;col<ncol;col++){
			move(row,col);
			if(col==0 && row==0){
				addch(ACS_ULCORNER);
			}
			else if(col==0 && row==nrow-1){
				addch(ACS_LLCORNER);
	    	}
			else if(col==ncol-1 && row==0){
				addch(ACS_URCORNER);
			}
			else if(col==ncol-1 && row==nrow-1){
				addch(ACS_LRCORNER);
			}
            else if(col==0 || col==ncol-1){
                addch(ACS_VLINE);
            }
            else if(row==0 || row==nrow-1){
                addch(ACS_HLINE);
            }
		}
	}
}

char c[] = "\\-/|";
void * drawWheel(void * id){
    int n=0;
    while(1){
        move(20,35);
        addch(c[n]);
        n = (n+1)%4;
    } 
    pthread_exit(NULL);
}

int main(){
    setlocale(LC_CTYPE,"");
	initscr();
    
    pthread_t th;
    int rc;
    long t;
    //rc = pthread_create(&th,NULL,drawWheel,(void *)t);
	
	draw40x25box();
	move(10,10);
	printw("hello");
	getch();
	endwin();

    pthread_exit(NULL);
    return 0;
}
