2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
7 #include <aros/debug.h>
8 #include "iffparse_intern.h"
10 #define DEBUG_GOODTYPE(x) ;
12 /*****************************************************************************
15 #include <proto/iffparse.h>
17 AROS_LH1(LONG
, GoodType
,
20 AROS_LHA(LONG
, type
, D0
),
23 struct Library
*, IFFParseBase
, 44, IFFParse
)
26 Determines whether a IFF chunk type is valid according to the IFF specification.
29 type - An IFF chunk type to be tested.
36 Assumes the input type to be in local byte order.
47 *****************************************************************************/
54 /* How can it be a valid type if its not a valid ID */
57 DEBUG_GOODTYPE(bug("badtype 1\n"));
61 theId
[0] = type
>> 24;
62 theId
[1] = type
>> 16;
68 /* Greater than Z, not a type */
71 DEBUG_GOODTYPE(bug("badtype 2\n"));
75 /* If its less than 'A', and not in '0'..'9',
76 then if its not a space its not valid. */
78 && ((theId
[i
] < '0') || (theId
[i
] > '9'))
82 DEBUG_GOODTYPE(bug("badtype 3\n"));
86 /* Must be valid, try the next one */
89 DEBUG_GOODTYPE(bug("goodtype\n"));