handle_opt.h

来自「在linux/UNIX上」· C头文件 代码 · 共 50 行

H
50
字号
/**handle_opt.h*		provide some interface for handle the * / + - ^ ( );*AUTHOR:liyangth@gmail.com*VERSION:1.0;*DATE:2006-8-9;*/#ifndef HANDLE_OPT_H#define HANDLE_OPT_H#include <string.h>#include <stdlib.h>#include <stdio.h>#include <math.h>#include "stack.h"/*claimed in main.c*/extern stack_s oprand_stack;extern stack_s operator_stack;/*define the operator's PRI*OPERATOR:    (		^	*	+-	)*PRI:	   	  8		6	4	2	1*@PARAM:a operator;*@RETURN:the operator's PRI;*DATE:2006-8-8;*/int operator_pri(char operator);/*handle the operator '(' */void handle_left_b(char operator);/*handle the operator '^' */void handle_pow(char operator);/*handle the operator '*' and '/' */void handle_multi(char operator);/*handle the '+'and '-'*/void handle_add_and_sub(char operator);/*handle the ')' ; *	when we meet ')', we handle the stack until meet '(';*/void handle_right_b(char operator);#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?