Makefile: add option -std=c99

curses.c: add events for left and right buttons
Fixed warnings