This function opens a stream for writing data into the obstack obstack.
This starts an object in the obstack and makes it grow as data is
written (see Growing Objects).
fflush on this stream updates the current size of the
object to match the amount of data that has been written. After a call
fflush, you can examine the object temporarily.
You can move the file position of an obstack stream with
fseeko (see File Positioning). Moving the file position past
the end of the data written fills the intervening space with zeros.
To make the object permanent, update the obstack with
obstack_finish to finalize the object and get its address.
The following write to the stream starts a new object in the obstack,
and later writes add to that object until you do another
But how do you find out how long the object is? You can get the length
in bytes by calling
obstack_object_size (see Status of an Obstack), or you can null-terminate the object like this:
obstack_1grow (obstack, 0);
Whichever one you do, you must do it before calling
obstack_finish. (You can do both if you wish.)