2 * Copyright (C) 2012, The AROS Development Team. All rights reserved.
3 * Author: Jason S. McMullan <jason.mcmullan@gmail.com>
5 * Licensed under the AROS PUBLIC LICENSE (APL) Version 1.1
8 #include <proto/alib.h>
9 #include <proto/exec.h>
10 #include <proto/dos.h>
12 __startup
int _main(void)
14 struct Library
*DOSBase
;
15 int err
= RETURN_FAIL
;
17 if ((DOSBase
= OpenLibrary("dos.library", 0))) {
19 if ((fhw
= Open("PIPE:*", MODE_NEWFILE
))) {
22 if (NameFromFH(fhw
, name
, sizeof(name
)) != 0) {
25 Printf("PIPE:* => %s\n", name
);
26 if ((fhr
= Open(name
, MODE_OLDFILE
))) {
27 Write(fhw
, "Hello", 5);
31 Printf("Hello => %s\n", name
);
35 Printf("Can't get name, Error %d\n", IoErr());
39 Printf("Can't open PIPE:*\n");
41 CloseLibrary(DOSBase
);