1 #include <hidd/unixio.h>
2 #include <proto/exec.h>
7 struct Library
* OOPBase
;
8 struct DosLibrary
* DOSBase
;
10 int main (int argc
, char ** argv
)
16 struct TagItem tags
[ ]= {{TAG_DONE
, 0UL}};
17 struct uioMsg uio_msg
;
19 OOPBase
= OpenLibrary ("oop.library", 0);
23 vpa
[0] = (IPTR
)"oop.library";
24 VPrintf("Can't open library \"%s\"\n", vpa
);
28 DOSBase
= (struct DosLibrary
*) OpenLibrary (DOSNAME
, 0);
32 CloseLibrary (OOPBase
);
34 vpa
[0] = (IPTR
)DOSNAME
;
35 VPrintf("Can't open library \"%s\"\n", vpa
);
40 hidd
= OOP_NewObject (NULL
, CLID_Hidd_UnixIO
, tags
);
44 CloseLibrary (OOPBase
);
45 CloseLibrary ((struct Library
*)DOSBase
);
47 vpa
[0] = (IPTR
)CLID_Hidd_UnixIO
;
48 VPrintf("Need \"%s\" class\n", vpa
);
53 uio_msg
.um_MethodID
= OOP_GetMethodID(IID_Hidd_UnixIO
, moHidd_UnixIO_Wait
);
54 uio_msg
.um_Filedesc
= fd
;
55 uio_msg
.um_Mode
= vHidd_UnixIO_Read
;
56 ret
= OOP_DoMethod(hidd
, (OOP_Msg
)&uio_msg
);
59 VPrintf ("return code = %ld\n", vpa
);
61 OOP_DisposeObject (hidd
);
63 CloseLibrary ((struct Library
*)DOSBase
);
64 CloseLibrary (OOPBase
);