define __KERNEL_STRICT_NAMES to avoid inclusion of kernel types on systems that carry...
[cake.git] / test / systemtags.c
blob97bef1c225c4a8c0bc528156be381339868a6001
1 #include <proto/exec.h>
2 #include <proto/dos.h>
3 #include <dos/dos.h>
4 #include <dos/dostags.h>
6 #include <assert.h>
8 static BYTE sig;
9 static struct Task *t;
11 static void StartCommand(void)
13 struct FileHandle *fh = Open("S:Startup-Sequence", MODE_OLDFILE);
15 SystemTags("type in:", SYS_Input, (IPTR) fh);
17 Signal(t, 1<<sig);
20 int main(void)
22 struct FileHandle *fh;
24 SystemTags
26 "dir",
27 SYS_Asynch, TRUE,
28 SYS_Input, (IPTR) Open("NIL:", MODE_OLDFILE),
29 SYS_Output, (IPTR) Open("RAW:////Dir/CLOSE/WAIT", MODE_NEWFILE),
30 TAG_DONE
33 SystemTags
35 "systemtagsslave",
36 SYS_Asynch, TRUE,
37 SYS_Input, SYS_DupStream,
38 SYS_Output, SYS_DupStream,
39 TAG_DONE
42 fh = Open("S:Startup-Sequence", MODE_OLDFILE);
43 assert(fh!=NULL);
44 SystemTags("type in:", SYS_Input, (IPTR) fh, TAG_DONE);
46 sig = AllocSignal(-1);
47 t = FindTask(NULL);
49 CreateNewProcTags(NP_Entry, (IPTR) StartCommand, NP_Input, (IPTR) Input(), NP_CloseInput, FALSE);
51 Wait(1<<sig);
52 FreeSignal(sig);
54 return 0;