/* Return a pointer to the current position in the stream. */
UINT8* EFIAPI AmlStreamGetCurrPos(IN CONST AML_STREAM *Stream)
/* Return a pointer to the current position in the stream. */
UINT8* EFIAPI AmlStreamGetCurrPos(IN CONST AML_STREAM *Stream)
{
  if (!IS_STREAM (Stream)) {
    ASSERT (0);
    return NULL;
  }
  if (IS_STREAM_FORWARD (Stream)) {
    return Stream->Buffer + Stream->Index;
  } else if (IS_STREAM_BACKWARD (Stream)) {
    return Stream->Buffer + (Stream->MaxBufferSize - 1) - Stream->Index;
  } else {
    ASSERT (0);
    return NULL;
  }
}