if (pData->bDisplaying) { if ((pData->bRunning) && (!pData->bFreezing)) { mng_retcode iRetcode = process_display_disc (pData, (iRawlen / 2), (mng_uint16p)pRawdata);
{                                     mng_retcode iRetcode = process_display_disc (pData, (iRawlen / 2), (mng_uint16p)pRawdata);
READ_CHUNK (read_disc){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_READ_DISC, 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)  if ((iRawlen % 2) != 0)              /* check the length */    MNG_ERROR (pData, MNG_INVALIDLENGTH)#ifdef MNG_SUPPORT_DISPLAY  if (pData->bDisplaying)  {    if ((pData->bRunning) && (!pData->bFreezing))    {      mng_retcode iRetcode = process_display_disc (pData, (iRawlen / 2),                                                   (mng_uint16p)pRawdata);      if (iRetcode)                    /* on error bail out */        return iRetcode;    }  }#endif /* MNG_SUPPORT_DISPLAY */#ifdef MNG_STORE_CHUNKS  if (pData->bStorechunks)  {                                    /* 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_discp)*ppChunk)->iCount = iRawlen / 2;    MNG_ALLOC (pData, ((mng_discp)*ppChunk)->pObjectids, iRawlen)#ifndef MNG_BIGENDIAN_SUPPORTED    {      mng_uint32  iX;      mng_uint8p  pIn  = pRawdata;      mng_uint16p pOut = ((mng_discp)*ppChunk)->pObjectids;      for (iX = 0; iX < ((mng_discp)*ppChunk)->iCount; iX++)      {        *pOut++ = mng_get_uint16 (pIn);        pIn += 2;      }    }#else    MNG_COPY (((mng_discp)*ppChunk)->pObjectids, pRawdata, iRawlen)#endif /* !MNG_BIGENDIAN_SUPPORTED */  }#endif /* MNG_STORE_CHUNKS */#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_READ_DISC, MNG_LC_END)#endif  return MNG_NOERROR;                  /* done */}