pfs3.handler: Specify GlobalVec = -1, as per spec
[AROS.git] / test / runcommand.c
blob0f5dce573f91bb139ce4d21bf24ed43e9978e247
1 #include <proto/dos.h>
2 #include <proto/exec.h>
3 #include <dos/bptr.h>
4 #include <dos/dos.h>
5 #include <string.h>
6 #include <stdlib.h>
7 #include <stdio.h>
8 #include "../rom/exec/etask.h"
10 static LONG get_default_stack_size()
12 struct CommandLineInterface *cli = Cli();
13 return cli->cli_DefaultStack * CLI_DEFAULTSTACK_UNIT;
16 int main(int argc, char **argv)
18 struct aros_startup * oldstartup;
19 char *fname = "SYS:Utilities/Clock";
20 char *full = "";
21 int lastresult;
23 oldstartup = (struct aros_startup *)GetIntETask(FindTask(NULL))->iet_startup;
25 if(fname) {
27 BPTR seglist = LoadSeg(fname);
28 if(seglist)
30 SetProgramName(fname);
31 lastresult=RunCommand(seglist,get_default_stack_size(),
32 full,strlen(full));
33 UnLoadSeg(seglist);
37 printf("current iet_startup: %p, old iet_startup: %p\n", (struct aros_startup *)GetIntETask(FindTask(NULL))->iet_startup, oldstartup);
38 exit(0);