ncurses patch with contracts