Converting AE written in Turbo Pascal to C/Ncurses