Dec 132017
 
Multidimensional array manipulation in UNIX/MSC 'C' source.
File XXALLOC.ZIP from The Programmer’s Corner in
Category C Source Code
Multidimensional array manipulation in UNIX/MSC ‘C’ source.
File Name File Size Zip Size Zip Type
EXAMPLE1.C 1466 547 deflated
EXAMPLE2.C 1360 553 deflated
MAKEFILE 638 216 deflated
README 1698 883 deflated
XXALLOC.1 9491 2738 deflated
XXALLOC.C 36784 3146 deflated
XXALLOC.H 3467 652 deflated
XXALLOC.MAN 17797 3310 deflated
XXERROR.C 118 105 deflated
XXTEST.C 18154 2175 deflated

Download File XXALLOC.ZIP Here

Contents of the README file


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: [email protected]
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"






 December 13, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)