1 /* cout's RPN calculator 2 * http://rm-f.net/~cout/rpn/ 3 * Please email me at pbranna@clemson.edu if you have any comments 4 */ 5 6 #ifndef RPN_CALC_H 7 #define RPN_CALC_H 8 9 enum { 10 RPN_OK, 11 12 RPN_STACK_FULL, 13 RPN_BAD_PARAM, 14 RPN_EMPTY_STACK, 15 RPN_NONEMPTY_STACK, 16 RPN_ILLEGAL, 17 RPN_DIVIDE_BY_ZERO, 18 RPN_OUT_OF_MEMORY, 19 20 RPN_UNKNOWN 21 }; 22 23 int rpn_calc(const char *input, char *output, size_t out_len); 24 25 void rpn_calc_init(void); 26 void rpn_calc_close(void); 27 28 #endif |