mirror of
https://github.com/louisrubet/rpn
synced 2024-11-17 07:47:50 +01:00
Suppr. WIN32 target
This commit is contained in:
parent
b3a9a49939
commit
9043ab4077
3 changed files with 10 additions and 15 deletions
|
@ -133,7 +133,6 @@ int inprog(branch& myobj)
|
|||
{
|
||||
// run it
|
||||
prog.run(*_stack, *_global_heap, &local_heap);
|
||||
//TODO here: _local_heap free
|
||||
}
|
||||
|
||||
// point on next command
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
#define _USE_MATH_DEFINES
|
||||
|
||||
#ifdef WIN32
|
||||
#define M_PI 3.141592653589793238462643383279502797479068098137295573004504331874296718662975536062731407582759857177734375
|
||||
#define M_E 2.71828182845904523536028747135266231435842186719354886266923086032766716801933881697550532408058643341064453125
|
||||
#endif
|
||||
|
||||
//
|
||||
void pi(void)
|
||||
{
|
||||
|
|
19
src/rpn.cpp
19
src/rpn.cpp
|
@ -21,12 +21,6 @@
|
|||
*
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#ifdef WIN32
|
||||
#include <tchar.h>
|
||||
#else
|
||||
#define _TCHAR char
|
||||
#define _tmain main
|
||||
#endif
|
||||
#include <math.h>
|
||||
|
||||
extern "C" {
|
||||
|
@ -368,13 +362,20 @@ public:
|
|||
ret_value ret = ret_ok;
|
||||
cmd_type_t type;
|
||||
|
||||
_stack = &stk;
|
||||
// stack comes from outside
|
||||
_stack = &stk;
|
||||
|
||||
// global heap comes from outside
|
||||
_global_heap = &hp;
|
||||
|
||||
// local heap can come from outside
|
||||
// if not, set a new local heap
|
||||
if (local_hp != NULL)
|
||||
_local_heap = local_hp;
|
||||
else
|
||||
_local_heap = &local_heap;
|
||||
_err = ret_ok;
|
||||
|
||||
_err = ret_ok;
|
||||
_err_context = "";
|
||||
|
||||
// branches for 'if'
|
||||
|
@ -774,7 +775,7 @@ static void apply_default(void)
|
|||
}
|
||||
|
||||
//
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
heap global_heap;
|
||||
stack global_stack;
|
||||
|
|
Loading…
Reference in a new issue