/* Put the new data in the buffer and update the count */
bcopy(buf,responseBuffer+responseBufCount,count);
responseBufCount += count;
/* And null-terminate the buffer (this is used by the main procedure) */
*(responseBuffer+responseBufCount) = 0;
}
/* Note that because the output of the dumpwindow/dumpwindows operators are not defined, this routine might fail under a future release of NeXTSTEP. It's OK to use this code in little test apps like this, but please don't rely on these operators for commercial applications.
*/
BOOL getWindowBytes (int windowNum, int *bytes, int *type)
{
DPSTextProc oldTextProc;
/* Reset the character buffer variables */
responseBufCount = 0;
DPSWaitContext(DPSGetCurrentContext());
/* Now install our text proc. We're about to call the
dumpwindows operator, which will write out a whole bunch of
stuff on the output stream back to us. We need to install
our text proc before we do that, so that when the output
comes out we will catch it. Also, we remember the old text