escape-rpn.diff

Lakie, 2011-06-23 11:13

Download (929 Bytes)

View differences:

src/command.h Mon May 09 17:56:01 2011 +0100
125 125
bool parse_comment(const string&);
126 126
void reset_commands();
127 127
int DoCalc(const string&,size_t&);
128
int DoCalc(istream&,int&);
128 129
bool CLCommand(int);
129 130

  
130 131
#endif//_RENUM_COMMAND_H_FUNCTIONS_INCLUDED_
src/pseudo.cpp Mon May 09 17:56:01 2011 +0100
785 785
		in.ignore()>>setbase(16)>>ret>>setbase(10);
786 786
		return ret;
787 787
	}
788
	/*if (in.peek() == '(') {		// Read any RPN value
789
		//TODO: Magic goes here
790
	}*/
788
	if (in.peek() == '(') {		// Read any RPN value
789
		if(RPNOFF){
790
			IssueMessage(0, INVALID_EXTENSION);
791
			return 0;
792
		}
793
		int val, err = 0;
794
		val = DoCalc(in.ignore(),err);
795
		if (err>0)
796
			return 0;
797
		return val;
798
	}
791 799

  
792 800
	// Read any other value
793 801
	string str;