home *** CD-ROM | disk | FTP | other *** search
- xxalloc is a family of routines for dynamic array manipulation in one,
- two and three dimensions. Routines are included for allocation,
- initialization, printing, renumbering, and freeing both arrays of
- structures and arrays of simple types. Since the "edge-vector" approach
- is used for two and three dimensional arrays, this set of routines
- allows for the development of reusable subroutine libraries without
- regard to some "maximum" dimension. Both positive and negative indices
- are allowed.
-
- When I converted to C several years ago after my first large program in
- FORTRAN, the first thing I wanted to do was to have adjustable
- multi-dimensional arrays. This can be achieved in C (sort of, the array
- dimensions are fixed) through the use of pointers (the so called
- "edge-vector" approach, see also K&R p. 110). I then added routines
- for manipulating structures and routines for renumbering the indices,
- initializing, and printing. These routines also solve the problem of
- not being able to have 2D arrays greater than 64k on machines with 16
- bit addresses (ie. PC's).
-
- Installation instructions are in the makefile. A test program is
- included to exercise most of the package. I have compiled this package
- on many machines (SYS5, BSD, MSDOS) without a hitch. The man page uses
- some abbreviation to save space since there are actually 109 functions
- in this package.
-
- --
- Harold G. Walters Internet: walters@ce.okstate.edu
- School of Civil Engineering Uucp: {cbosgd, ihnp4, uiucdcs}
- Oklahoma State University !okstate!osubem!walters
- Stillwater, OK 74078 "If all you have is a hammer, everything looks like a nail"
-
-
-
-
-