The xtype C Library, Version 1.00

Contents:

  1. About the xtype library
  2. Installation and uninstallation
  3. Library documentation
    1. The XARRAY type
    2. The XLIST type
    3. The XSTR type
  4. Standard waffle at the end of freeware documentation
    1. Credits
    2. Legals

About the xtype library

The xtype library contains a collection of routines for some dynamically-allocated data types I use in several of my projects; you are probably looking at this file because you downloaded this library as part of the source code for some software package of mine. I don't, at this stage, distribute it separately, though there is no reason you can't separate it from whatever package it came from and use it in your own projects (provided you obey the licence).

It provides a generic array type (XARRAY), a generic linked-list type (XLIST) and a string type (XSTR), designed to take care of all the realloc()-ing required for objects with dynamically-changing sizes.


Installation and uninstallation

The xtype library has been carefully written so that it should compile on any ANSI C compiler; I used various incarnations of GCC for testing. Older K&R style compilers won't like the ANSI-style prototyping used, though I suppose there's no reason it won't compile if the prototypes were removed (better just get GCC).

To install the library, edit the top of the make file provided in the src directory so that it matches your system and preferences. Then run 'make install' and the library will install itself.

If the make file doesn't work for some reason (e.g. the command lines may be too long for DOS/Windows to handle), it's easy enough to compile it manually. First, compile each C source file into an object file. Then link all the object files into 'xtype.X', where X is the extension your system uses for library files. Copy the xtype.h file into your include directory and the library file into your library directory.

Should you not want the library on your computer any more, simply delete the xtype library and the xtype.h file.


Library documentation

  1. The XARRAY generic array type
  2. The XLIST generic linked list type
  3. The XSTR string type

Standard waffle at the end of freeware documentation

Credits

The author of the xtype library is Nicholas Paul Sheppard. He lives in Sydney, Australia and does not tolerate advertising material posted to his e-mail address.

E-mail: nps@zeta.org.au

WWW: http://www.zeta.org.au/~nps

Legals

The xtype library is distributed under my standard licence; the file licence.txt describes this licence in detail.