if (pData->bDisplaying)
READ_CHUNK (read_past){  mng_uint32 iCount;#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_READ_PAST, MNG_LC_START)#endif  if (!pData->bHasMHDR)                /* sequence checks */    MNG_ERROR (pData, MNG_SEQUENCEERROR)#ifdef MNG_INCLUDE_JNG  if ((pData->bHasIHDR) || (pData->bHasBASI) || (pData->bHasDHDR) || (pData->bHasJHDR))#else  if ((pData->bHasIHDR) || (pData->bHasBASI) || (pData->bHasDHDR))#endif    MNG_ERROR (pData, MNG_SEQUENCEERROR)                                       /* check the length */  if ((iRawlen < 41) || (((iRawlen - 11) % 30) != 0))    MNG_ERROR (pData, MNG_INVALIDLENGTH)  iCount = ((iRawlen - 11) / 30);      /* how many entries again */#ifdef MNG_SUPPORT_DISPLAY  if (pData->bDisplaying)  {    /* TODO: something !!! */  }#endif /* MNG_SUPPORT_DISPLAY */#ifdef MNG_STORE_CHUNKS  if (pData->bStorechunks)  {    mng_uint32       iX;    mng_past_sourcep pSource;                                       /* initialize storage */    mng_retcode iRetcode = ((mng_chunk_headerp)pHeader)->fCreate (pData, pHeader, ppChunk);    if (iRetcode)                      /* on error bail out */      return iRetcode;                                       /* store the fields */    ((mng_pastp)*ppChunk)->iDestid     = mng_get_uint16 (pRawdata);    ((mng_pastp)*ppChunk)->iTargettype = *(pRawdata+2);    ((mng_pastp)*ppChunk)->iTargetx    = mng_get_int32  (pRawdata+3);    ((mng_pastp)*ppChunk)->iTargety    = mng_get_int32  (pRawdata+7);    ((mng_pastp)*ppChunk)->iCount      = iCount;    pRawdata += 11;                                       /* get a buffer for all the source blocks */    MNG_ALLOC (pData, ((mng_pastp)*ppChunk)->pSources, (iCount * sizeof (mng_past_source)))    pSource = ((mng_pastp)*ppChunk)->pSources;    for (iX = 0; iX < iCount; iX++)    /* now copy the source blocks */    {      pSource->iSourceid     = mng_get_uint16 (pRawdata);      pSource->iComposition  = *(pRawdata+2);      pSource->iOrientation  = *(pRawdata+3);      pSource->iOffsettype   = *(pRawdata+4);      pSource->iOffsetx      = mng_get_int32 (pRawdata+5);      pSource->iOffsety      = mng_get_int32 (pRawdata+9);      pSource->iBoundarytype = *(pRawdata+13);      pSource->iBoundaryl    = mng_get_int32 (pRawdata+14);      pSource->iBoundaryr    = mng_get_int32 (pRawdata+18);      pSource->iBoundaryt    = mng_get_int32 (pRawdata+22);      pSource->iBoundaryb    = mng_get_int32 (pRawdata+26);      pSource  += sizeof (mng_past_source);      pRawdata += 30;    }  }#endif /* MNG_STORE_CHUNKS */#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_READ_PAST, MNG_LC_END)#endif  return MNG_NOERROR;                  /* done */}