|
Defines |
| #define | DMALLOC(s, f, ln) __malloc(s) |
| #define | DREALLOC(p, s, f, ln) __realloc(p,s) |
| #define | DFREE(p, f, ln) __free(p) |
| #define | STRTREEITEM(st, x) AddPtr(LPBYTE,(st)->strings,(st)->offsets[x]) |
| #define | ItemArrayInternalAlloc(ia, sz, f, ln) (ia->bFixed)?ItemArrayInternalAllocFixed(ia,sz,f,ln):ItemArrayInternalAllocDynamic(ia,sz,f,ln) |
Functions |
| BOOL | ItemArrayInitEx (ITEMARRAY *ia, DWORD sz, DWORD init, DWORD grow) |
| | Initializes an item array of the specified size.
|
| BOOL | ItemArrayInitFixedEx (ITEMARRAY *ia, DWORD sz, DWORD init, DWORD grow) |
| | Initializes an item array of the specified size, where each item occupies a fixed position in memory and doesn't move even when the array grows in size.
|
| static DWORD | ItemArrayGrow (ITEMARRAY *ia, DWORD need) |
| static LONG | ItemArrayInternalAllocDynamic (ITEMARRAY *ia, DWORD sz, LPTSTR f, DWORD ln) |
| static void | AllocNewBlock (ITEMARRAY *ia, DWORD sz, LPTSTR f, DWORD ln) |
| static DWORD | PopulateAlloc (ITEMARRAY *ia, DWORD sz) |
| static LONG | ItemArrayInternalAllocFixed (ITEMARRAY *ia, DWORD sz, LPTSTR f, DWORD ln) |
| LPVOID | ItemArrayPtr (ITEMARRAY *ia, int i) |
| | Returns a pointer to an item within the item array.
|
| LPVOID | ItemArrayAllocOnePtr (ITEMARRAY *ia) |
| | Adds a single item to the item array and returns a pointer to that item.
|
| LONG | ItemArrayAllocOne (ITEMARRAY *ia) |
| | Adds a single item to the item array and returns an index to that item.
|
| LPVOID | ItemArrayAllocManyPtr (ITEMARRAY *ia, DWORD sz) |
| | Adds a number of items at once to the item array and returns a pointer to those items.
|
| LONG | ItemArrayAllocMany (ITEMARRAY *ia, DWORD sz) |
| | Adds a number of items at once to the item array.
|
| void | ItemArrayFree (ITEMARRAY *ia) |
| | Frees an item array.
|
| void | ItemArraySort (ITEMARRAY *ia, int(*cmp)(LPVOID, LPVOID)) |
| | Sorts the items found in an item array.
|
| void | ItemArrayRemoveItem (ITEMARRAY *ia, LONG idx) |
| | Removes an item from an item array.
|
| LONG | ItemArraySearchIndex (ITEMARRAY *ia, LPVOID key, int(*cmp)(LPVOID, LPVOID)) |
| | Searches for an item within an item array and returns the index to the first item found.
|
| LPVOID | ItemArraySearch (ITEMARRAY *ia, LPVOID key, int(*cmp)(LPVOID, LPVOID)) |
| | Searches for an item within an item array and returns a pointer to the first item found.
|
| static int | StringCmp (LPCTSTR a, LPCTSTR b, BOOL ignoreCase) |
| LONG | StringTreeFindString (STRINGTREE *st, LPCTSTR str) |
| | Finds the item with the string _str_ in a string tree and returns its index.
|
| LPBYTE | StringTreeGetString (STRINGTREE *st, LONG i) |
| | Finds the string with the index _i_ in a string tree.
|
| LPVOID | StringTreeGetData (STRINGTREE *st, LONG i) |
| | Gets a pointer to the data in a string tree in index _i_.
|
| LPVOID | StringTreeFindData (STRINGTREE *st, LPCTSTR str) |
| | Finds the item with the string _str_ in a string tree and returns its data.
|
| static void | StringTreeInsertString (STRINGTREE *st, LPCTSTR str, LONG *root) |
| LONG | StringTreeAddString (STRINGTREE *st, LPCTSTR str) |
| | Adds a string to a string tree and returns its index.
|
| BOOL | StringTreeInitEx (STRINGTREE *st, DWORD szItem, DWORD init, DWORD grow, BOOL ignoreCase) |
| | Initializes a new string tree with data size _szItem_, initial size _init_ and growth size _grow_.
|
| BOOL | StringTreeFree (STRINGTREE *st) |
| | Frees a string tree's memory.
|
| LPVOID | MemArrayReAlloc (ITEMARRAY *ia, LPVOID pv, DWORD sz) |
| | Changes the size of a memory pointer within a memory array.
|
| void | MemArrayFreePtr (ITEMARRAY *ia, LPVOID pv) |
| | Frees a memory pointer within a memory array.
|
| void | MemArrayFreeAll (ITEMARRAY *ia) |
| | Frees all memory pointers within a memory array.
|
| BOOL | ItemStackInit (ITEMSTACK *stack, DWORD sz) |
| | Initializes an item stack, a special kind of item array.
|
| LPVOID | ItemStackGet (ITEMSTACK *stack) |
| | Gets a pointer to the last item in the item stack.
|
| LPVOID | ItemStackPush (ITEMSTACK *stack, LPVOID p) |
| | Pushes memory to the item stack.
|
| void | ItemStackPop (ITEMSTACK *stack) |
| | Frees the last item stored in the item stack and pops it out of it.
|
| void | ItemStackFree (ITEMSTACK *stack) |
| | Frees the item stack and all its pointers.
|
Variables |
| static DWORD | allocstrat [] |