rem: {
context: static status_t handle_reply(port_id   reply_port,                             int32*    pCode,                             bigtime_t timeout,                             BMessage* reply){PRINT(("handle_reply(port: %ld)\n", reply_port));	status_t err;	do	{		err = port_buffer_size_etc(reply_port, 8, timeout);	} while (err == B_INTERRUPTED);	if (err < 0)	{		PRINT(("handle_reply() error 1: %lx\n", err));		return err;	}	// The API lied. It really isn't an error code, but the message size...	char* pAllocd = NULL;	char* pMem    = NULL;	char tmp[0x800];	if (err < 0x800)	{		pMem = tmp;	}	else	{		pAllocd = new char[err];		pMem = pAllocd;	}	do	{		err = read_port(reply_port, pCode, pMem, err);	} while (err == B_INTERRUPTED);	if (err < 0)	{		PRINT(("handle_reply() error 2: %lx\n", err));		return err;	}	if (*pCode == 'PUSH')	{		PRINT(("handle_reply() error 3: %x\n", B_ERROR));		return B_ERROR;	}	if (*pCode != 'pjpp')	{		PRINT(("handle_reply() error 4: port message code not 'pjpp' but "			"'%lx'\n", *pCode));		return B_ERROR;	}	err = reply->Unflatten(pMem);	// There seems to be a bug in the original Be implementation.	// It never free'd pAllocd !	if (pAllocd)	{		delete[] pAllocd;	}PRINT(("handle_reply() done: %lx\n", err));	return err;}