Separate rpn_calc from main.c
Handle errors