if ((pData->bHasBASI) ||            (bDodisplay)      ||             ((pData->iBreakpoint) && (pData->iBreakpoint != 8))) { mng_imagep pImage = (mng_imagep)pData->pCurrentobj;
mng_imagep pImage = (mng_imagep)pData->pCurrentobj;
mng_retcode process_display_iend (mng_datap pData){  mng_retcode iRetcode, iRetcode2;  mng_bool bDodisplay = MNG_FALSE;  mng_bool bCleanup   = (mng_bool)(pData->iBreakpoint != 0);#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_PROCESS_DISPLAY_IEND, MNG_LC_START)#endif#ifdef MNG_INCLUDE_JNG                 /* progressive+alpha JNG can be displayed now */  if ((pData->bHasJHDR) && (pData->bJPEGprogressive) &&      ((pData->eImagetype == mng_it_jng         ) ||       (((mng_imagep)pData->pStoreobj)->bVisible)    ) &&      ((pData->iJHDRcolortype == MNG_COLORTYPE_JPEGGRAYA ) ||       (pData->iJHDRcolortype == MNG_COLORTYPE_JPEGCOLORA)    ))    bDodisplay = MNG_TRUE;#endif      if ((pData->bDisplaying) && (pData->bRunning) && (!pData->bFreezing))  {    if ((pData->bHasBASI) ||           /* was it a BASI stream */        (bDodisplay)      ||           /* or should we display the JNG */                                       /* or did we get broken here last time ? */        ((pData->iBreakpoint) && (pData->iBreakpoint != 8)))    {      mng_imagep pImage = (mng_imagep)pData->pCurrentobj;      if (!pImage)                     /* or was it an "on-the-fly" image ? */        pImage = (mng_imagep)pData->pObjzero;                                       /* display it now then ? */      if ((pImage->bVisible) && (pImage->bViewable))      {                                /* ok, so do it */        iRetcode = display_image (pData, pImage, bDodisplay);        if (iRetcode)                  /* on error bail out */          return iRetcode;        if (pData->bTimerset)          /* timer break ? */          pData->iBreakpoint = 6;      }    }    if ((pData->bHasDHDR) ||           /* was it a DHDR stream */        (pData->iBreakpoint == 8))     /* or did we get broken here last time ? */    {      mng_imagep pImage = (mng_imagep)pData->pDeltaImage;                                       /* perform the delta operations needed */      iRetcode = execute_delta_image (pData, pImage, (mng_imagep)pData->pObjzero);      if (iRetcode)                    /* on error bail out */        return iRetcode;                                       /* display it now then ? */      if ((pImage->bVisible) && (pImage->bViewable))      {                                /* ok, so do it */        iRetcode = display_image (pData, pImage, MNG_FALSE);        if (iRetcode)                  /* on error bail out */          return iRetcode;        if (pData->bTimerset)          /* timer break ? */          pData->iBreakpoint = 8;      }    }  }  if (!pData->bTimerset)               /* can we continue ? */  {    pData->iBreakpoint = 0;            /* clear this flag now ! */                                       /* cleanup object 0 */    reset_object_details (pData, (mng_imagep)pData->pObjzero,                          0, 0, 0, 0, 0, 0, 0, MNG_TRUE);    if (pData->bInflating)             /* if we've been inflating */    {                                  /* cleanup row-processing, */      iRetcode  = cleanup_rowproc (pData);                                       /* also cleanup inflate! */      iRetcode2 = mngzlib_inflatefree (pData);      if (iRetcode)                    /* on error bail out */        return iRetcode;      if (iRetcode2)        return iRetcode2;    }#ifdef MNG_INCLUDE_JNG    if (pData->bJPEGdecompress)        /* if we've been decompressing */    {                                  /* cleanup row-processing, */      iRetcode  = cleanup_rowproc (pData);                                       /* also cleanup decompress! */      iRetcode2 = mngjpeg_decompressfree (pData);      if (iRetcode)                    /* on error bail out */        return iRetcode;      if (iRetcode2)        return iRetcode2;    }#endif                                       /* if the image was displayed on the fly, */                                       /* we'll have to make the app refresh */    if ((pData->eImagetype != mng_it_mng) && (pData->fDisplayrow))      pData->bNeedrefresh = MNG_TRUE;    if (bCleanup)                      /* if we got broken last time we need to cleanup */    {      pData->bHasIHDR = MNG_FALSE;     /* IEND signals the end for most ... */      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_TRACE  MNG_TRACE (pData, MNG_FN_PROCESS_DISPLAY_IEND, MNG_LC_END)#endif  return MNG_NOERROR;}