home *** CD-ROM | disk | FTP | other *** search
- #pragma once
-
- #if ! WINTER_SHELL
-
- #include <stddef.h>
- #define volatile
-
- /* assertions */
- #ifndef NDEBUG
- #define myassert(x) ((void) ((x) || assertfailed()))
- #else
- #define myassert(x) ((void) 0)
- #endif
- #define require(x) myassert(x)
- #define check(x) myassert(x)
- #define ensure(x) myassert(x)
- int assertfailed(void);
-
- /* types */
- typedef unsigned long TicksType;
- typedef char CStr255[sizeof(Str255)];
-
- /* memory operations */
- void *memclr(void *p, size_t n);
- Boolean HandleValid(void *h);
- Boolean HandleValidSize(void *h, size_t n);
- void *HandleBeginClear(size_t n);
- void HandleEnd(void *h);
- Boolean PtrValid(void *p);
- size_t PtrSize(void *p);
- void *PtrBegin(size_t n);
- void PtrEnd(void *p);
-
- /* low-memory globals */
- Ptr GetCurStackBase(void);
- void SetStkLowPt(Ptr p);
-
- /* linked list stuff */
-
- typedef union LLUnion LLType, *LLPtr, **LLHandle;
-
- union LLUnion {
- LLPtr pnext;
- LLHandle hnext;
- };
-
- /* void pointer so we don't have to worry about type casting in function calls */
- typedef void *LLObjectType;
-
- /* linked list operations */
- Boolean LLHValid(LLObjectType item);
- LLObjectType LLHNext(LLObjectType item);
- LLObjectType LLHAppend(LLObjectType head, LLObjectType item);
- LLObjectType LLHDelete(LLObjectType head, LLObjectType item);
-
- #endif /* WINTER_SHELL */
-