mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-12 15:27:36 +02:00
Cleanup
This commit is contained in:
parent
ee8b5eeb65
commit
f679613923
2 changed files with 2 additions and 13 deletions
|
@ -14,7 +14,6 @@
|
|||
long global_stack_size = 0;
|
||||
long global_heap_size = 0;
|
||||
|
||||
static long long_arg(int argc,char **argv,char *name,long dval);
|
||||
static void c_entry_pt(int,closure,closure);
|
||||
static void Cyc_main(long stack_size,long heap_size,char *stack_base);
|
||||
|
||||
|
@ -86,12 +85,4 @@ static void Cyc_main (stack_size,heap_size,stack_base)
|
|||
|
||||
printf("Internal error: should never have reached this line\n"); exit(0);}}
|
||||
|
||||
static long long_arg(argc,argv,name,dval)
|
||||
int argc; char **argv; char *name; long dval;
|
||||
{int j;
|
||||
for(j=1;(j+1)<argc;j += 2)
|
||||
if (strcmp(name,argv[j]) == 0)
|
||||
return(atol(argv[j+1]));
|
||||
return(dval);}
|
||||
|
||||
#endif /* CYCLONE_RUNTIME_MAIN_H */
|
||||
|
|
|
@ -74,10 +74,8 @@
|
|||
|
||||
(define *c-main-function*
|
||||
"main(int argc,char **argv)
|
||||
{long stack_size = long_arg(argc,argv,\"-s\",STACK_SIZE);
|
||||
long heap_size = long_arg(argc,argv,\"-h\",HEAP_SIZE);
|
||||
global_stack_size = stack_size;
|
||||
global_heap_size = heap_size;
|
||||
{long stack_size = global_stack_size = STACK_SIZE;
|
||||
long heap_size = global_heap_size = HEAP_SIZE;
|
||||
_cyc_argc = argc;
|
||||
_cyc_argv = argv;
|
||||
Cyc_main(stack_size,heap_size,(char *) &stack_size);
|
||||
|
|
Loading…
Add table
Reference in a new issue