Implementing an RPN calculator in C