.TH FLOATSAV 3carl CARL
.SH NAME
floatsav \- iteratively save floatsams on a dynamic array
.SH SYNOPSIS
.B #include <carl/carl.h>
.sp
.B floatsav(base, floatsam) 
.br
.B float **base, floatsam;
.br
.sp
.B reinitfloatsav() 
.br
.sp
.SH DESCRIPTION
.B floatsav()
comes in handy when reading an input floatsam 
(32-bit floating point data)
stream where you want to save it in an array.
.B floatsav()
will take one float at a time and automatically scale the size of
the buffer to fit all data, 
by using
.I malloc(3)
and
.I realloc(3).
Its first argument should be the address of a pointer to a float.
.B floatsav() 
will deposit the address of the base of the array it
claims in this pointer.  The value of the pointer must be initialized
to 0.
The second argument is the floatsam to be saved
in the array.  Iterative calls to
.B floatsav()
with the same base address will save subsequent floatsams on the same array.
.B floatsav() 
returns the number of floatsams saved since the last call to
.B reinitfloatsav().
.B reinitfloatsav()
resets the count to 0, and 
sets up
.B floatsav()
to start a new array on its next call.
It is only necessary to call
.B reinitfloatsav()
after the first array is built.
.SH AUTHOR
Gareth Loy
.SH FILES
/usr/local/lib/libcarl.a.
.SH SEE ALSO
gen0(1carl).
