41 #if PRAGMA_STRUCT_ALIGN
42 #pragma options align = mac68k
43 #elif PRAGMA_STRUCT_PACKPUSH
45 #elif PRAGMA_STRUCT_PACK
49 typedef UInt32 AVLFlags;
52 kAVLFlagUseHandleForDataStorageMask = 0x00000001
78 kAVLIsRightBranch = 2,
85 errItemAlreadyInTree = -960,
86 errNotValidTree = -961,
87 errItemNotFoundInTree = -962,
88 errCanNotInsertWhileWalkProcInProgress = -963,
89 errTreeIsLocked = -964,
90 errTreeIsCorrupt = -965
98 unsigned long privateStuff[12];
123 const void *itemPtr);
149 SInt32 balance,
void *refCon);
150 typedef STACK_UPP_TYPE(AVLCompareItemsProcPtr) AVLCompareItemsUPP;
164 #if !OPAQUE_UPP_TYPES
167 uppAVLCompareItemsProcInfo = 0x00002FF0
170 inline AVLCompareItemsUPP
174 uppAVLCompareItemsProcInfo,
175 GetCurrentArchitecture());
178 #define NewAVLCompareItemsUPP(userRoutine) \
179 (AVLCompareItemsUPP) \
180 NewRoutineDescriptor((ProcPtr)(userRoutine), uppAVLCompareItemsProcInfo, \
181 GetCurrentArchitecture())
195 #if !OPAQUE_UPP_TYPES
198 uppAVLItemSizeProcInfo = 0x000003F0
204 (ProcPtr)(userRoutine), uppAVLItemSizeProcInfo, GetCurrentArchitecture());
207 #define NewAVLItemSizeUPP(userRoutine) \
209 NewRoutineDescriptor((ProcPtr)(userRoutine), uppAVLItemSizeProcInfo, \
210 GetCurrentArchitecture())
224 #if !OPAQUE_UPP_TYPES
227 uppAVLDisposeItemProcInfo = 0x000003C0
230 inline AVLDisposeItemUPP
234 uppAVLDisposeItemProcInfo,
235 GetCurrentArchitecture());
238 #define NewAVLDisposeItemUPP(userRoutine) \
239 (AVLDisposeItemUPP) \
240 NewRoutineDescriptor((ProcPtr)(userRoutine), uppAVLDisposeItemProcInfo, \
241 GetCurrentArchitecture())
255 #if !OPAQUE_UPP_TYPES
258 uppAVLWalkProcInfo = 0x000FEBE0
265 (ProcPtr)(userRoutine), uppAVLWalkProcInfo, GetCurrentArchitecture());
268 #define NewAVLWalkUPP(userRoutine) \
269 (AVLWalkUPP) NewRoutineDescriptor( \
270 (ProcPtr)(userRoutine), uppAVLWalkProcInfo, GetCurrentArchitecture())
284 #if !OPAQUE_UPP_TYPES
291 #define DisposeAVLCompareItemsUPP(userUPP) DisposeRoutineDescriptor(userUPP)
305 #if !OPAQUE_UPP_TYPES
312 #define DisposeAVLItemSizeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
326 #if !OPAQUE_UPP_TYPES
333 #define DisposeAVLDisposeItemUPP(userUPP) DisposeRoutineDescriptor(userUPP)
347 #if !OPAQUE_UPP_TYPES
354 #define DisposeAVLWalkUPP(userUPP) DisposeRoutineDescriptor(userUPP)
369 #if !OPAQUE_UPP_TYPES
373 AVLCompareItemsUPP userUPP)
375 return (SInt32)CALL_FOUR_PARAMETER_UPP(userUPP, uppAVLCompareItemsProcInfo,
376 tree, i1, i2, nd_typ);
379 #define InvokeAVLCompareItemsUPP(tree, i1, i2, nd_typ, userUPP) \
380 (SInt32) CALL_FOUR_PARAMETER_UPP((userUPP), uppAVLCompareItemsProcInfo, \
381 (tree), (i1), (i2), (nd_typ))
395 AVLItemSizeUPP userUPP);
396 #if !OPAQUE_UPP_TYPES
399 AVLItemSizeUPP userUPP)
401 return (UInt32)CALL_TWO_PARAMETER_UPP(userUPP, uppAVLItemSizeProcInfo, tree,
405 #define InvokeAVLItemSizeUPP(tree, itemPtr, userUPP) \
406 (UInt32) CALL_TWO_PARAMETER_UPP((userUPP), uppAVLItemSizeProcInfo, (tree), \
421 AVLDisposeItemUPP userUPP);
422 #if !OPAQUE_UPP_TYPES
425 AVLDisposeItemUPP userUPP)
427 CALL_TWO_PARAMETER_UPP(userUPP, uppAVLDisposeItemProcInfo, tree, dataP);
430 #define InvokeAVLDisposeItemUPP(tree, dataP, userUPP) \
431 CALL_TWO_PARAMETER_UPP((userUPP), uppAVLDisposeItemProcInfo, (tree), (dataP))
445 AVLNodeType node, UInt32 level, SInt32 balance,
void *refCon,
447 #if !OPAQUE_UPP_TYPES
451 UInt32 level, SInt32 balance,
void *refCon,
454 return (OSErr)CALL_SEVEN_PARAMETER_UPP(userUPP, uppAVLWalkProcInfo, tree,
455 dataP, visitStage, node, level,
459 #define InvokeAVLWalkUPP(tree, dataP, visitStage, node, level, balance, \
461 (OSErr) CALL_SEVEN_PARAMETER_UPP((userUPP), uppAVLWalkProcInfo, (tree), \
462 (dataP), (visitStage), (node), (level), \
467 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
469 #define NewAVLCompareItemsProc(userRoutine) NewAVLCompareItemsUPP(userRoutine)
470 #define NewAVLItemSizeProc(userRoutine) NewAVLItemSizeUPP(userRoutine)
471 #define NewAVLDisposeItemProc(userRoutine) NewAVLDisposeItemUPP(userRoutine)
472 #define NewAVLWalkProc(userRoutine) NewAVLWalkUPP(userRoutine)
473 #define CallAVLCompareItemsProc(userRoutine, tree, i1, i2, nd_typ) \
474 InvokeAVLCompareItemsUPP(tree, i1, i2, nd_typ, userRoutine)
475 #define CallAVLItemSizeProc(userRoutine, tree, itemPtr) \
476 InvokeAVLItemSizeUPP(tree, itemPtr, userRoutine)
477 #define CallAVLDisposeItemProc(userRoutine, tree, dataP) \
478 InvokeAVLDisposeItemUPP(tree, dataP, userRoutine)
479 #define CallAVLWalkProc(userRoutine, tree, dataP, visitStage, node, level, \
481 InvokeAVLWalkUPP(tree, dataP, visitStage, node, level, balance, refCon, \
503 AVLInit(UInt32 flags, AVLCompareItemsUPP compareItemsProc,
504 AVLItemSizeUPP sizeItemProc, AVLDisposeItemUPP disposeItemProc,
666 #if CALL_NOT_IN_CARBON
710 #if PRAGMA_STRUCT_ALIGN
711 #pragma options align = reset
712 #elif PRAGMA_STRUCT_PACKPUSH
714 #elif PRAGMA_STRUCT_PACK
718 #ifdef PRAGMA_IMPORT_OFF
OSErr AVLFind(AVLTreePtr tree, const void *key, void *dataPtr, UInt32 *itemSize)
#define NewAVLWalkUPP(userRoutine)
Definition: AVLTree.h:268
OSErr AVLGetRefcon(AVLTreePtr tree, void **refCon)
UInt16 AVLNodeType
Definition: AVLTree.h:73
#define NewAVLItemSizeUPP(userRoutine)
Definition: AVLTree.h:207
OSErr AVLCheckTree(AVLTreePtr tree)
OSErr AVLCount(AVLTreePtr tree, UInt32 *count)
UInt16 AVLVisitStage
Definition: AVLTree.h:56
UInt32 InvokeAVLItemSizeUPP(AVLTreePtr tree, const void *itemPtr, AVLItemSizeUPP userUPP)
OSErr AVLInsert(AVLTreePtr tree, const void *data)
OSErr InvokeAVLWalkUPP(AVLTreePtr tree, const void *dataP, AVLVisitStage visitStage, AVLNodeType node, UInt32 level, SInt32 balance, void *refCon, AVLWalkUPP userUPP)
OSErr AVLGetIndItem(AVLTreePtr tree, UInt32 index, void *dataPtr, UInt32 *itemSize)
void DisposeAVLCompareItemsUPP(AVLCompareItemsUPP userUPP)
OSErr AVLInit(UInt32 flags, AVLCompareItemsUPP compareItemsProc, AVLItemSizeUPP sizeItemProc, AVLDisposeItemUPP disposeItemProc, void *refCon, AVLTreePtr *tree)
OSErr AVLRemove(AVLTreePtr tree, const void *key, void *dataPtr, UInt32 *itemSize)
void InvokeAVLDisposeItemUPP(AVLTreePtr tree, const void *dataP, AVLDisposeItemUPP userUPP)
void DisposeAVLWalkUPP(AVLWalkUPP userUPP)
UInt16 AVLOrder
Definition: AVLTree.h:65
OSErr AVLDispose(AVLTreePtr *tree, AVLOrder order)
#define NewAVLDisposeItemUPP(userRoutine)
Definition: AVLTree.h:238
void DisposeAVLDisposeItemUPP(AVLDisposeItemUPP userUPP)
OSErr AVLLockTree(AVLTreePtr tree)
OSErr AVLWalk(AVLTreePtr tree, AVLWalkUPP walkProc, AVLOrder order, void *walkRefCon)
OSErr AVLUnlockTree(AVLTreePtr tree)
void DisposeAVLItemSizeUPP(AVLItemSizeUPP userUPP)
typedef CALLBACK_API(SInt32, AVLCompareItemsProcPtr)(AVLTreePtr tree
SInt32 InvokeAVLCompareItemsUPP(AVLTreePtr tree, const void *i1, const void *i2, AVLNodeType nd_typ, AVLCompareItemsUPP userUPP)
#define NewAVLCompareItemsUPP(userRoutine)
Definition: AVLTree.h:178
Basic Macintosh data types.
Mixed Mode Manager Interfaces.
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)