[comp.sys.atari.st] Data Structures Toolkit

swklassen@tiger.waterloo.edu (Steven W. Klassen) (03/13/90)

Many months ago I asked the net if anyone was interested in a 
toolkit (collection of C routines) I was putting together to
work with various data structures.  I only got a few responses
but decided to go ahead with the project anyway since it would
be useful to me.

I have finally completed version 1.0 of my toolkit and it is
ready to go to the net.  If you are interested in receiving
it please e-mail me.  If there are enough responses I will
post to the net, otherwise I will just e-mail it to those
who want it.

This initial version contains routines for various types of
sorts as well as for working with different types of lists.
It contains three libraries, described briefly below:

sorts - This library includes routines for sorting an array
        of character pointers.  (Which are, of course, pointing
        to the data you really want to sort.)  It includes
        a simple linear insertion sort (inefficient but easy
        to understand), Hoare's quicksort (efficient for
        'average' arrays but inefficient if the array is
        already in increasing order), and the heapsort algorithm
        (efficient in all cases but slightly more overhead
        than the quicksort.

lists - This library defines a data type called list.  Two 
        implementations are included, a singly linked list and
        a doubly linked list.  Routines are included to create
        lists, insert and delete stuff, move around in the
        list, retrieve stuff, and catenate and split lists.
        The lists are created in such a way that they can
        contain any type of data.  (In fact you can put a 
        different data type in each node if you want to.)

clist - This library defines a data type called a circular
        list.  These lists are similar to the above lists
        except that they go in a circle (i.e. the 'last'
        element will point back to the 'first' element).
        Both singly linked and doubly linked implementations
        are included.  All the same routines are included
        as in lists with the exception of catenate and split.

The toolkit is broken into three directories.  
doc\ contains the documentation for each of the libraries as well
as copywrite restrictions (see below) and a list of error messages
the toolkit may produce on occasion.

include\ contains all the header files required to defined the
data types.

src\ contains arc'ed files containing the source code for the toolkit.

The entire toolkit is available in source form only.  To use it
you can either #include the source files into your programs or
compile them into libraries (which is what I did) in a form
acceptable to your C compiler.

All the code has been written in Mark Williams C but should work
with any K & R C compiler with little or no modification.

If you have any problems with the toolkit (errors or ideas for
improvement) let me know and I may change them in a future
upgrade.

Copywrite information:
For complete copywrite information see the copywrit file in the
doc/ directory.  Basically you can use my sources without 
restriction in any non-profit application provided that you
also provide source code.  If you want to use them in a for-
profit application (including shareware) you need to contact
me first.  (I will rarely require money, usually I will just
ask that you put in a credit with my name on it if I think
your program is well written, or require that you remove all
mention of me if I think your program sucks.)

Once again, if you are interested in this toolkit, e-mail me
and I will either e-mail you a copy or post to the net.

Steven W. Klassen                       +-----------------------------+
Computer Science Major                  | Support the poor...buy fur! |
University of Waterloo                  +-----------------------------+