muimaster.library: Area class will not eat wheel movement messages
[AROS.git] / workbench / libs / diskfont / dosstreamhook.c
blob9a735ce06ccada33abe3f80e73eeb6daf84c7d04
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Hook used by endian funcs to read from a dos file.
6 Lang: english
7 */
9 /****************************************************************************************/
11 #include <proto/dos.h>
12 #include <aros/debug.h>
13 #include <aros/asmcall.h>
14 #include <aros/bigendianio.h>
16 #undef DOSBase
18 /****************************************************************************************/
20 AROS_UFH3(LONG, dosstreamhook,
21 AROS_UFHA(struct Hook *, hook, A0),
22 AROS_UFHA(BPTR, fh, A2),
23 AROS_UFHA(ULONG *, msg, A1)
26 AROS_USERFUNC_INIT
28 APTR DOSBase = hook->h_Data;
30 LONG rc = 0;
32 switch (*msg)
34 case BEIO_READ:
35 rc = FGetC (fh);
36 #if 0
37 kprintf ("dsh: Read: %02X\n", rc);
38 #endif
40 break;
42 case BEIO_WRITE:
43 rc = FPutC (fh, ((struct BEIOM_Write *)msg)->Data);
44 break;
46 case BEIO_IGNORE:
47 Flush (fh);
49 rc = Seek (fh, ((struct BEIOM_Ignore *)msg)->Count, OFFSET_CURRENT);
50 #if 0
51 kprintf ("dsh: Skip %d\n", ((struct BEIOM_Ignore *)msg)->Count);
52 #endif
53 break;
57 return rc;
58 AROS_USERFUNC_EXIT
59 } /* dosstreamhook */
61 /****************************************************************************************/