VArrayLib is a rather simple implementation of variable-size arrays (that is, number of items and hence block size is variable, item size is fixed). PowerPlant users will no doubt be familiar with LArray and see the resemblance, but (like all my projects here) VArrayLib is written in C. Although the name implies it's a library, it is so small that it can be compiled quickly, so there's no compelling reason to give it in binary form.
I use it a great deal; it is a required part of Transductor and Ferrous Fist, and an earlier version is embedded in Blugs 1.x. Look inside for a bit of PowerPC assembly, which some might find interesting. If you use VArrayLib in a project, please let me know. I encourage everyone to suggest improvements.
VArrayLib 1.2 Features: three new routines: VASetNthItem, VAInsert, and VAInsertAtEnd. these can be quite useful. Also fixed a heapsort bug that could show up when sorting 32-bit integers or internally sorting with 32-bit entries. It was apparently a copy/paste error on my part.
Stockpile Manager is an example of doing something genuinely useful with something as simple as VArrayLib. The Stockpile Manager is a free open-source replacement for the Apple's Collection Manager. I am finding that a Stockpile is a very good way to implement a preferences file: no more worrying about how to read the right struct when you have different prefs formats across versions. Instead you identify your data via Collection tags.
The Stockpile Manager duplicates the entire Collection Manager API. All you have to do is replace the word 'Collection' with 'Stockpile', so GetNewCollection becomes GetNewStockpile. Note, however, that I have not done any reverse-engineering. Internal formats are different, so you can't pass a Collection to the Stockpile Manager, and vice versa. The flattened data format is documented, so flattened objects are compatible between the two.
Why did I write this thing? Because I don't like to see older machines, with pre-8.1 systems or without QuickDraw GX, excluded from development efforts. And because it's hard to debug something when you don't have the source code (and I haven't bothered to politely ask Apple for their Collection Manager sources).
There's no documentation included because the Collection Manager is already documented in Chapter 5 of Inside Macintosh: QuickDraw GX Environment and Utilities.
Download VArrayLib 1.2 (108K tar/gzip; includes docs)
Download Stockpile Manager 1.04 (12K tar/gzip) You also need VArrayLib!