if ((!pData->bTimerset) && (!pData->pCurraniobj)) pData->bRunning = MNG_FALSE;
mng_retcode process_display (mng_datap pData){  mng_retcode iRetcode = MNG_NOERROR;#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_PROCESS_DISPLAY, MNG_LC_START)#endif  if (!pData->iBreakpoint)             /* not broken previously ? */  {    if ((pData->iRequestframe) || (pData->iRequestlayer) || (pData->iRequesttime))    {      pData->bSearching = MNG_TRUE;    /* indicate we're searching */      iRetcode = clear_canvas (pData); /* make the canvas virgin black ?!? */      if (iRetcode)                    /* on error bail out */        return iRetcode;                                       /* let's start from the top, shall we */      pData->pCurraniobj = pData->pFirstaniobj;    }    else    {      if (!pData->pCurraniobj)         /* no animation object? start at top */        pData->pCurraniobj = pData->pFirstaniobj;    }  }  do                                   /* process the objects */  {    if (pData->bSearching)             /* are we looking sor something ? */    {      if ((pData->iRequestframe) &&          (pData->iRequestframe < ((mng_object_headerp)pData->pCurraniobj)->iFramenr))      {        pData->iRequestframe = 0;      /* found the frame ! */        pData->bSearching    = MNG_FALSE;      }      else      if ((pData->iRequestlayer) &&          (pData->iRequestlayer < ((mng_object_headerp)pData->pCurraniobj)->iLayernr))      {        pData->iRequestlayer = 0;      /* found the layer ! */        pData->bSearching    = MNG_FALSE;      }      else      if ((pData->iRequesttime) &&          (pData->iRequesttime < ((mng_object_headerp)pData->pCurraniobj)->iPlaytime))      {        pData->iRequesttime  = 0;      /* found the playtime ! */        pData->bSearching    = MNG_FALSE;      }    }                                       /* do we need to finish something first ? */    if ((pData->iBreakpoint) && (pData->iBreakpoint < 99))    {      switch (pData->iBreakpoint)      /* return to broken display routine */      {        case 1  : { iRetcode = process_display_fram2 (pData); break; }        case 3  : ;                    /* same as 4 !!! */        case 4  : { iRetcode = process_display_show  (pData); break; }        case 5  : { iRetcode = process_display_clon2 (pData); break; }        default : MNG_ERROR (pData, MNG_INTERNALERROR)      }    }    else    {      if (pData->pCurraniobj)        iRetcode = ((mng_object_headerp)pData->pCurraniobj)->fProcess (pData, pData->pCurraniobj);    }    if (!pData->bTimerset)             /* reset breakpoint flag ? */      pData->iBreakpoint = 0;                                       /* can we advance to next object ? */    if ((!iRetcode) && (pData->pCurraniobj) &&        (!pData->bTimerset) && (!pData->bSectionwait))    {      pData->pCurraniobj = ((mng_object_headerp)pData->pCurraniobj)->pNext;                                       /* MEND processing to be done ? */      if ((pData->eImagetype == mng_it_mng) && (!pData->pCurraniobj))        iRetcode = process_display_mend (pData);      if (!pData->pCurraniobj)         /* refresh after last image ? */        pData->bNeedrefresh = MNG_TRUE;    }  }                                    /* until error or a break or no more objects */  while ((!iRetcode) && (pData->pCurraniobj) &&         (!pData->bTimerset) && (!pData->bSectionwait) && (!pData->bFreezing));  if (iRetcode)                        /* on error bail out */    return iRetcode;                                       /* refresh needed ? */  if ((!pData->bTimerset) && (pData->bNeedrefresh))  {    iRetcode = display_progressive_refresh (pData, 1);    if (iRetcode)                      /* on error bail out */      return iRetcode;  }                                       /* timer break ? */  if ((pData->bTimerset) && (!pData->iBreakpoint))    pData->iBreakpoint = 99;  else  if (!pData->bTimerset)    pData->iBreakpoint = 0;            /* reset if no timer break */#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_PROCESS_DISPLAY, MNG_LC_END)#endif  return MNG_NOERROR;}