delint
[AROS.git] / test / systemtags.c
blobf4eaddc10bfc9c9960cb396cd5cb526304810cf7
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/exec.h>
7 #include <proto/dos.h>
8 #include <dos/dos.h>
9 #include <dos/dostags.h>
11 #include <assert.h>
13 static BYTE sig;
14 static struct Task *t;
16 static void StartCommand(void)
18 BPTR fh = Open("S:Startup-Sequence", MODE_OLDFILE);
20 SystemTags("type in:", SYS_Input, (IPTR) fh);
22 Signal(t, 1<<sig);
25 int main(void)
27 BPTR fh;
29 SystemTags
31 "dir",
32 SYS_Asynch, TRUE,
33 SYS_Input, (IPTR) Open("NIL:", MODE_OLDFILE),
34 SYS_Output, (IPTR) Open("RAW:////Dir/CLOSE/WAIT", MODE_NEWFILE),
35 TAG_DONE
38 SystemTags
40 "systemtagsslave",
41 SYS_Asynch, TRUE,
42 SYS_Input, SYS_DupStream,
43 SYS_Output, SYS_DupStream,
44 TAG_DONE
47 fh = Open("S:Startup-Sequence", MODE_OLDFILE);
48 assert(fh!=BNULL);
49 SystemTags("type in:", SYS_Input, (IPTR) fh, TAG_DONE);
51 sig = AllocSignal(-1);
52 t = FindTask(NULL);
54 CreateNewProcTags(NP_Entry, (IPTR) StartCommand, NP_Input, (IPTR) Input(), NP_CloseInput, FALSE);
56 Wait(1<<sig);
57 FreeSignal(sig);
59 return 0;