Major changes to main.c

New functions:
 - increment_input()
 - print_input()
 - handle_signal()

The program is more or less complete. print_input() calls printf() 21
times but it doesn't really matter since it's never called except when
requested or when the program is in fact complete.