pData->bHasJDAA         = MNG_FALSE;
READ_CHUNK (read_iend){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_READ_IEND, MNG_LC_START)#endif  if (iRawlen > 0)                     /* must not contain data! */    MNG_ERROR (pData, MNG_INVALIDLENGTH);#ifdef MNG_INCLUDE_JNG                 /* sequence checks */  if ((!pData->bHasIHDR) && (!pData->bHasBASI) && (!pData->bHasDHDR) && (!pData->bHasJHDR))#else  if ((!pData->bHasIHDR) && (!pData->bHasBASI) && (!pData->bHasDHDR))#endif    MNG_ERROR (pData, MNG_SEQUENCEERROR)                                       /* IHDR-block requires IDAT */  if ((pData->bHasIHDR) && (!pData->bHasIDAT))    MNG_ERROR (pData, MNG_IDATMISSING)  pData->iImagelevel--;                /* one level up */#ifdef MNG_SUPPORT_DISPLAY  {                                    /* create an animation object */    mng_retcode iRetcode = create_ani_image (pData);    if (iRetcode)                      /* on error bail out */      return iRetcode;                                       /* display processing */    iRetcode = process_display_iend (pData);    if (iRetcode)                      /* on error bail out */      return iRetcode;  }#endif /* MNG_SUPPORT_DISPLAY */#ifdef MNG_SUPPORT_DISPLAY  if (!pData->bTimerset)               /* reset only if not broken !!! */  {#endif                                       /* IEND signals the end for most ... */    pData->bHasIHDR         = MNG_FALSE;    pData->bHasBASI         = MNG_FALSE;    pData->bHasDHDR         = MNG_FALSE;#ifdef MNG_INCLUDE_JNG    pData->bHasJHDR         = MNG_FALSE;    pData->bHasJSEP         = MNG_FALSE;    pData->bHasJDAT         = MNG_FALSE;#endif    pData->bHasPLTE         = MNG_FALSE;    pData->bHasTRNS         = MNG_FALSE;    pData->bHasGAMA         = MNG_FALSE;    pData->bHasCHRM         = MNG_FALSE;    pData->bHasSRGB         = MNG_FALSE;    pData->bHasICCP         = MNG_FALSE;    pData->bHasBKGD         = MNG_FALSE;    pData->bHasIDAT         = MNG_FALSE;#ifdef MNG_SUPPORT_DISPLAY  }#endif  #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;  }#endif /* MNG_STORE_CHUNKS */#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_READ_IEND, MNG_LC_END)#endif  return MNG_NOERROR;                  /* done */}