forgotten commit. disabled until egl is adapted.
[AROS-Contrib.git] / scalos / main / Test / testwbargs.c
blob61b967e195ae8fabdadd45f03b4e8acb82b3402b
1 // TestWBArgs.c
2 // 25 Apr 2001 17:28:53
4 #include <workbench/startup.h>
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <proto/dos.h>
10 int main(int argc, char *argv[])
12 char Path[512];
13 struct WBStartup *Wbs;
14 struct MsgPort *fsPort;
15 ULONG n;
17 Wbs = (struct WBStartup *) argv;
19 if (argc > 0)
21 fprintf(stderr, "Please start this programn from Workbench\n");
22 return 5;
25 printf("NumArgs = %ld\n", Wbs->sm_NumArgs);
27 GetCurrentDirName(Path, sizeof(Path));
28 printf("CurrentDir = <%s>\n", Path);
30 fsPort = GetFileSysTask();
31 if (fsPort)
33 printf("default filesystem = <%s>\n", ((struct Task *) fsPort->mp_SigTask)->tc_Node.ln_Name);
36 for (n=0; n<Wbs->sm_NumArgs; n++)
38 struct WBArg *arg = &Wbs->sm_ArgList[n];
40 NameFromLock(arg->wa_Lock, Path, sizeof(Path));
41 printf("arg[%ld] Lock=%08lx <%s> Name=<%s>\n", n, arg->wa_Lock, Path, arg->wa_Name);