Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / libs / diskfont / dosstreamhook.c
blob4c84082ef6d591a29afb6241f818a86e13f46108
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 /****************************************************************************************/
18 AROS_UFH3(LONG, dosstreamhook,
19 AROS_UFHA(struct Hook *, hook, A0),
20 AROS_UFHA(BPTR, fh, A2),
21 AROS_UFHA(ULONG *, msg, A1)
24 AROS_USERFUNC_INIT
26 LONG rc = 0;
28 switch (*msg)
30 case BEIO_READ:
31 rc = FGetC (fh);
32 #if 0
33 kprintf ("dsh: Read: %02X\n", rc);
34 #endif
36 break;
38 case BEIO_WRITE:
39 rc = FPutC (fh, ((struct BEIOM_Write *)msg)->Data);
40 break;
42 case BEIO_IGNORE:
43 Flush (fh);
45 rc = Seek (fh, ((struct BEIOM_Ignore *)msg)->Count, OFFSET_CURRENT);
46 #if 0
47 kprintf ("dsh: Skip %d\n", ((struct BEIOM_Ignore *)msg)->Count);
48 #endif
49 break;
53 return rc;
54 AROS_USERFUNC_EXIT
55 } /* dosstreamhook */
57 /****************************************************************************************/