if ((pData->bDisplaying) && (pData->bRunning) && (!pData->bFreezing)) {                                   iRetcode = process_display_defi (pData);  if (iRetcode)                     return iRetcode; }
READ_CHUNK (read_defi){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_READ_DEFI, 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 != 2) && (iRawlen != 3) && (iRawlen != 4) &&      (iRawlen != 12) && (iRawlen != 28))    MNG_ERROR (pData, MNG_INVALIDLENGTH)#ifdef MNG_SUPPORT_DISPLAY  {    mng_retcode iRetcode;    pData->iDEFIobjectid    = mng_get_uint16 (pRawdata);    if (iRawlen > 2)      pData->iDEFIdonotshow = *(pRawdata+2);    else      pData->iDEFIdonotshow = 0;    if (iRawlen > 3)      pData->iDEFIconcrete  = *(pRawdata+3);    else      pData->iDEFIconcrete  = 0;    if (iRawlen > 4)    {      pData->bDEFIhasloca   = MNG_TRUE;      pData->iDEFIlocax     = mng_get_int32 (pRawdata+4);      pData->iDEFIlocay     = mng_get_int32 (pRawdata+8);    }    else      pData->bDEFIhasloca   = MNG_FALSE;    if (iRawlen > 12)    {      pData->bDEFIhasclip   = MNG_TRUE;      pData->iDEFIclipl     = mng_get_int32 (pRawdata+12);      pData->iDEFIclipr     = mng_get_int32 (pRawdata+16);      pData->iDEFIclipt     = mng_get_int32 (pRawdata+20);      pData->iDEFIclipb     = mng_get_int32 (pRawdata+24);    }    else      pData->bDEFIhasclip   = MNG_FALSE;                                       /* create an animation object */    iRetcode = create_ani_defi (pData);    if (iRetcode)                      /* on error bail out */      return iRetcode;    if ((pData->bDisplaying) && (pData->bRunning) && (!pData->bFreezing))    {                                  /* do the display processing */      iRetcode = process_display_defi (pData);      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_defip)*ppChunk)->iObjectid    = mng_get_uint16 (pRawdata);    if (iRawlen > 2)      ((mng_defip)*ppChunk)->iDonotshow = *(pRawdata+2);    if (iRawlen > 3)      ((mng_defip)*ppChunk)->iConcrete  = *(pRawdata+3);    if (iRawlen > 4)    {      ((mng_defip)*ppChunk)->bHasloca   = MNG_TRUE;      ((mng_defip)*ppChunk)->iXlocation = mng_get_int32 (pRawdata+4);      ((mng_defip)*ppChunk)->iYlocation = mng_get_int32 (pRawdata+8);    }    else      ((mng_defip)*ppChunk)->bHasloca   = MNG_FALSE;    if (iRawlen > 12)    {      ((mng_defip)*ppChunk)->bHasclip   = MNG_TRUE;      ((mng_defip)*ppChunk)->iLeftcb    = mng_get_int32 (pRawdata+12);      ((mng_defip)*ppChunk)->iRightcb   = mng_get_int32 (pRawdata+16);      ((mng_defip)*ppChunk)->iTopcb     = mng_get_int32 (pRawdata+20);      ((mng_defip)*ppChunk)->iBottomcb  = mng_get_int32 (pRawdata+24);    }    else      ((mng_defip)*ppChunk)->bHasclip   = MNG_FALSE;  }#endif /* MNG_STORE_CHUNKS */#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_READ_DEFI, MNG_LC_END)#endif  return MNG_NOERROR;                  /* done */}