Pass height=0 to init_win() to make window as wide as the terminal screen. Also did some minor code re-structuring around the calls of init_win() in main().