<commit_before>#include "display.hh"

Display::Display(){
	for(int i=0;i<NUMBER_OF_PARENTWINDOW;i++){
		this->freeWindows.push(i);
	}
}

Display::~Display(){
	
}

void Display::initDisplay(bool cursset){
	initscr();
	raw();
	keypad(stdscr, TRUE);
	noecho();
	curs_set(cursset);
}

WINDOW* Display::createWindow(int height,int width,int y,int x){
	if(!this->freeWindows.empty()){
		WINDOW * w =newwin(height,width,y,x);
		parentWindows[w]=this->freeWindows.top();
		return w;
	}
	//~ 
	//~ WINDOW * childs[NUMBER_OF_CHILDWINDOW];
	//~ windows[w];
//~ 
	return 0;
}

//~ void deleteWindowByName(WINDOW * w){
	//~ map<WINDOW*,int]>::iterator it;
	//~ it = windows.find(w);
	//~ windows.erase(it);
	//~ delwin(w);
//~ }

//~ void refreshAllWindows(){
	//~ for(map<WINDOW*,WINDOW*[NUMBER_OF_CHILDWINDOW]>::iterator it = windows.begin(); it != windows.end();++it){
		//~ wrefresh(it->first);
	//~ }
//~ }
//~ 
//~ void initDisplay(){
	//~ initscr();
	//~ raw();
	//~ keypad(stdscr, TRUE);
	//~ noecho();
	//~ curs_set(FALSE);
//~ }<commit_msg>fix createWindow()<commit_after>#include "display.hh"

Display::Display(){
	for(int i=0;i<NUMBER_OF_PARENTWINDOW;i++){
		this->freeWindows.push(i);
	}
}

Display::~Display(){
	
}

void Display::initDisplay(bool cursset){
	initscr();
	raw();
	keypad(stdscr, TRUE);
	noecho();
	curs_set(cursset);
}

WINDOW* Display::createWindow(int height,int width,int y,int x){
	if(!this->freeWindows.empty()){
		WINDOW * w =newwin(height,width,y,x);
		parentWindows[w]=this->freeWindows.top();
		this->freeWindows.pop();
		return w;
	}
	return 0;
}

//~ void deleteWindowByName(WINDOW * w){
	//~ map<WINDOW*,int]>::iterator it;
	//~ it = windows.find(w);
	//~ windows.erase(it);
	//~ delwin(w);
//~ }

//~ void refreshAllWindows(){
	//~ for(map<WINDOW*,WINDOW*[NUMBER_OF_CHILDWINDOW]>::iterator it = windows.begin(); it != windows.end();++it){
		//~ wrefresh(it->first);
	//~ }
//~ }
//~ 
//~ void initDisplay(){
	//~ initscr();
	//~ raw();
	//~ keypad(stdscr, TRUE);
	//~ noecho();
	//~ curs_set(FALSE);
//~ }
{'fraction_non_alphanumeric': 0.24348253812100346, 'fraction_numerical': 0.001967535661583866, 'mean_word_length': 4.269430051813472, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6415549', 'n_tokens_mistral': 849, 'n_tokens_neox': 840, 'n_words': 117}