home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 4
/
FreshFish_May-June1994.bin
/
gnu
/
os-include
/
inline
/
iffparse.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-12-09
|
19KB
|
586 lines
#ifndef _INLINE_IFFPARSE_H
#define _INLINE_IFFPARSE_H
#include <sys/cdefs.h>
#include <inline/stubs.h>
__BEGIN_DECLS
#ifndef BASE_EXT_DECL
#define BASE_EXT_DECL extern struct IFFParseBase* IFFParseBase;
#endif
#ifndef BASE_PAR_DECL
#define BASE_PAR_DECL
#define BASE_PAR_DECL0 void
#endif
#ifndef BASE_NAME
#define BASE_NAME IFFParseBase
#endif
static __inline struct IFFHandle *
AllocIFF (BASE_PAR_DECL0)
{
BASE_EXT_DECL
register struct IFFHandle * _res __asm("d0");
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
__asm __volatile ("jsr a6@(-0x1e)"
: "=r" (_res)
: "r" (a6)
: "a0","a1","d0","d1", "memory");
return _res;
}
static __inline struct LocalContextItem *
AllocLocalItem (BASE_PAR_DECL long type,long id,long ident,long dataSize)
{
BASE_EXT_DECL
register struct LocalContextItem * _res __asm("d0");
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register long d0 __asm("d0") = type;
register long d1 __asm("d1") = id;
register long d2 __asm("d2") = ident;
register long d3 __asm("d3") = dataSize;
__asm __volatile ("jsr a6@(-0xba)"
: "=r" (_res)
: "r" (a6), "r" (d0), "r" (d1), "r" (d2), "r" (d3)
: "a0","a1","d0","d1","d2","d3", "memory");
return _res;
}
static __inline void
CloseClipboard (BASE_PAR_DECL struct ClipboardHandle *clipHandle)
{
BASE_EXT_DECL
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register struct ClipboardHandle *a0 __asm("a0") = clipHandle;
__asm __volatile ("jsr a6@(-0xfc)"
: /* no output */
: "r" (a6), "r" (a0)
: "a0","a1","d0","d1", "memory");
}
static __inline void
CloseIFF (BASE_PAR_DECL struct IFFHandle *iff)
{
BASE_EXT_DECL
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register struct IFFHandle *a0 __asm("a0") = iff;
__asm __volatile ("jsr a6@(-0x30)"
: /* no output */
: "r" (a6), "r" (a0)
: "a0","a1","d0","d1", "memory");
}
static __inline LONG
CollectionChunk (BASE_PAR_DECL struct IFFHandle *iff,long type,long id)
{
BASE_EXT_DECL
register LONG _res __asm("d0");
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register struct IFFHandle *a0 __asm("a0") = iff;
register long d0 __asm("d0") = type;
register long d1 __asm("d1") = id;
__asm __volatile ("jsr a6@(-0x8a)"
: "=r" (_res)
: "r" (a6), "r" (a0), "r" (d0), "r" (d1)
: "a0","a1","d0","d1", "memory");
return _res;
}
static __inline LONG
CollectionChunks (BASE_PAR_DECL struct IFFHandle *iff,LONG *propArray,long numPairs)
{
BASE_EXT_DECL
register LONG _res __asm("d0");
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register struct IFFHandle *a0 __asm("a0") = iff;
register LONG *a1 __asm("a1") = propArray;
register long d0 __asm("d0") = numPairs;
__asm __volatile ("jsr a6@(-0x90)"
: "=r" (_res)
: "r" (a6), "r" (a0), "r" (a1), "r" (d0)
: "a0","a1","d0","d1", "memory");
return _res;
}
static __inline struct ContextNode *
CurrentChunk (BASE_PAR_DECL struct IFFHandle *iff)
{
BASE_EXT_DECL
register struct ContextNode * _res __asm("d0");
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register struct IFFHandle *a0 __asm("a0") = iff;
__asm __volatile ("jsr a6@(-0xae)"
: "=r" (_res)
: "r" (a6), "r" (a0)
: "a0","a1","d0","d1", "memory");
return _res;
}
static __inline LONG
EntryHandler (BASE_PAR_DECL struct IFFHandle *iff,long type,long id,long position,struct Hook *handler,APTR object)
{
BASE_EXT_DECL
register LONG _res __asm("d0");
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register struct IFFHandle *a0 __asm("a0") = iff;
register long d0 __asm("d0") = type;
register long d1 __asm("d1") = id;
register long d2 __asm("d2") = position;
register struct Hook *a1 __asm("a1") = handler;
register APTR a2 __asm("a2") = object;
__asm __volatile ("jsr a6@(-0x66)"
: "=r" (_res)
: "r" (a6), "r" (a0), "r" (d0), "r" (d1), "r" (d2), "r" (a1), "r" (a2)
: "a0","a1","a2","d0","d1","d2", "memory");
return _res;
}
static __inline LONG
ExitHandler (BASE_PAR_DECL struct IFFHandle *iff,long type,long id,long position,struct Hook *handler,APTR object)
{
BASE_EXT_DECL
register LONG _res __asm("d0");
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register struct IFFHandle *a0 __asm("a0") = iff;
register long d0 __asm("d0") = type;
register long d1 __asm("d1") = id;
register long d2 __asm("d2") = position;
register struct Hook *a1 __asm("a1") = handler;
register APTR a2 __asm("a2") = object;
__asm __volatile ("jsr a6@(-0x6c)"
: "=r" (_res)
: "r" (a6), "r" (a0), "r" (d0), "r" (d1), "r" (d2), "r" (a1), "r" (a2)
: "a0","a1","a2","d0","d1","d2", "memory");
return _res;
}
static __inline struct CollectionItem *
FindCollection (BASE_PAR_DECL struct IFFHandle *iff,long type,long id)
{
BASE_EXT_DECL
register struct CollectionItem * _res __asm("d0");
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register struct IFFHandle *a0 __asm("a0") = iff;
register long d0 __asm("d0") = type;
register long d1 __asm("d1") = id;
__asm __volatile ("jsr a6@(-0xa2)"
: "=r" (_res)
: "r" (a6), "r" (a0), "r" (d0), "r" (d1)
: "a0","a1","d0","d1", "memory");
return _res;
}
static __inline struct LocalContextItem *
FindLocalItem (BASE_PAR_DECL struct IFFHandle *iff,long type,long id,long ident)
{
BASE_EXT_DECL
register struct LocalContextItem * _res __asm("d0");
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register struct IFFHandle *a0 __asm("a0") = iff;
register long d0 __asm("d0") = type;
register long d1 __asm("d1") = id;
register long d2 __asm("d2") = ident;
__asm __volatile ("jsr a6@(-0xd2)"
: "=r" (_res)
: "r" (a6), "r" (a0), "r" (d0), "r" (d1), "r" (d2)
: "a0","a1","d0","d1","d2", "memory");
return _res;
}
static __inline struct StoredProperty *
FindProp (BASE_PAR_DECL struct IFFHandle *iff,long type,long id)
{
BASE_EXT_DECL
register struct StoredProperty * _res __asm("d0");
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register struct IFFHandle *a0 __asm("a0") = iff;
register long d0 __asm("d0") = type;
register long d1 __asm("d1") = id;
__asm __volatile ("jsr a6@(-0x9c)"
: "=r" (_res)
: "r" (a6), "r" (a0), "r" (d0), "r" (d1)
: "a0","a1","d0","d1", "memory");
return _res;
}
static __inline struct ContextNode *
FindPropContext (BASE_PAR_DECL struct IFFHandle *iff)
{
BASE_EXT_DECL
register struct ContextNode * _res __asm("d0");
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register struct IFFHandle *a0 __asm("a0") = iff;
__asm __volatile ("jsr a6@(-0xa8)"
: "=r" (_res)
: "r" (a6), "r" (a0)
: "a0","a1","d0","d1", "memory");
return _res;
}
static __inline void
FreeIFF (BASE_PAR_DECL struct IFFHandle *iff)
{
BASE_EXT_DECL
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register struct IFFHandle *a0 __asm("a0") = iff;
__asm __volatile ("jsr a6@(-0x36)"
: /* no output */
: "r" (a6), "r" (a0)
: "a0","a1","d0","d1", "memory");
}
static __inline void
FreeLocalItem (BASE_PAR_DECL struct LocalContextItem *localItem)
{
BASE_EXT_DECL
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register struct LocalContextItem *a0 __asm("a0") = localItem;
__asm __volatile ("jsr a6@(-0xcc)"
: /* no output */
: "r" (a6), "r" (a0)
: "a0","a1","d0","d1", "memory");
}
static __inline LONG
GoodID (BASE_PAR_DECL long id)
{
BASE_EXT_DECL
register LONG _res __asm("d0");
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register long d0 __asm("d0") = id;
__asm __volatile ("jsr a6@(-0x102)"
: "=r" (_res)
: "r" (a6), "r" (d0)
: "a0","a1","d0","d1", "memory");
return _res;
}
static __inline LONG
GoodType (BASE_PAR_DECL long type)
{
BASE_EXT_DECL
register LONG _res __asm("d0");
register struct IFFParseBase* a6 __asm("a6") = BASE_NAME;
register long d0 __asm("d0") = type;
__asm __volatile ("jsr a6@(-0x108)"
: "=r" (_res)
: "r" (a6), "r" (d0)
: "a0","a1","d0","d1", "memory");
return _res;
}
static __inline STRPTR
IDtoStr (BASE_PAR_DECL long id,STRPTR buf)
{
BASE_EXT_DECL
register STRPTR _res __asm("d0");
register struct IFF