IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9729


Ignore:
Timestamp:
Oct 24, 2006, 12:29:53 PM (20 years ago)
Author:
Paul Price
Message:

psVectorAlloc and psArrayAlloc set length to that requested;
psVectorAllocEmpty and psArrayAllocEmpty set the length to zero.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/psLibSDRS.tex

    r9725 r9729  
    1 %%% $Id: psLibSDRS.tex,v 1.436 2006-10-24 21:24:08 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.437 2006-10-24 22:29:53 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    20332033\begin{prototype}
    20342034psArray *psArrayAlloc(long nalloc);
     2035psArray *psArrayAllocEmpty(long nalloc);
    20352036psArray *psArrayRealloc(psArray *array, long nalloc);
    20362037\end{prototype}
     
    20382039In these functions, \code{nalloc} is the number of elements to
    20392040allocate.  In \code{psArrayAlloc}, the value of \code{psArray.n} is
    2040 initially set to zero.  Users may choose to restrict the data range
    2041 after the \code{psArrayAlloc} function is called.  For
    2042 \code{psArrayRealloc}, if the value of \code{nalloc} is smaller than
    2043 the current value of \code{psArray.n}, then \code{psArray.n} is set to
    2044 \code{nalloc}, the array is adjusted down to match \code{nalloc}, and
    2045 the extra elements are dropped and freed if necesitated by the
    2046 reference counter.  If \code{nalloc} is larger than the current value
    2047 of \code{psArray.n}, \code{psArray.n} is left intact.  If the value of
    2048 \code{array} is \code{NULL}, then \code{psArrayRealloc} must return an
    2049 error.
     2041initially set to the number of allocated elements; in
     2042\code{psArrayAllocEmpty}, the value of \code{psArray.n} is initially
     2043set to zero.  Users may choose to restrict the data range after the
     2044\code{psArrayAlloc} function is called.  For \code{psArrayRealloc}, if
     2045the value of \code{nalloc} is smaller than the current value of
     2046\code{psArray.n}, then \code{psArray.n} is set to \code{nalloc}, the
     2047array is adjusted down to match \code{nalloc}, and the extra elements
     2048are dropped and freed if necesitated by the reference counter.  If
     2049\code{nalloc} is larger than the current value of \code{psArray.n},
     2050\code{psArray.n} is left intact.  If the value of \code{array} is
     2051\code{NULL}, then \code{psArrayRealloc} must return an error.
    20502052
    20512053Since \code{psArray} stores pointers, values on the array shall always
Note: See TracChangeset for help on using the changeset viewer.