if ((pData->bDisplaying) && (pData->bRunning) && (!pData->bFreezing)) { iRetcode = process_display_show (pData);
READ_CHUNK (read_show){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_READ_SHOW, 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 != 0) && (iRawlen != 2) && (iRawlen != 4) && (iRawlen != 5))    MNG_ERROR (pData, MNG_INVALIDLENGTH)#ifdef MNG_SUPPORT_DISPLAY  {    mng_retcode iRetcode;    if (iRawlen)                       /* determine parameters if any */    {      pData->iSHOWfromid = mng_get_uint16 (pRawdata);      if (iRawlen > 2)        pData->iSHOWtoid = mng_get_uint16 (pRawdata+2);      else        pData->iSHOWtoid = pData->iSHOWfromid;      if (iRawlen > 4)        pData->iSHOWmode = *(pRawdata+4);      else        pData->iSHOWmode = 0;    }    else                               /* use defaults then */    {      pData->iSHOWmode   = 2;      pData->iSHOWfromid = 1;      pData->iSHOWtoid   = 65535;    }                                       /* create a SHOW animation object */    iRetcode = create_ani_show (pData, pData->iSHOWfromid, pData->iSHOWtoid,                                       pData->iSHOWmode);    if (iRetcode)                      /* on error bail out */      return iRetcode;                                       /* go and do it! */    if ((pData->bDisplaying) && (pData->bRunning) && (!pData->bFreezing))    {      iRetcode = process_display_show (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_showp)*ppChunk)->bEmpty      = (mng_bool)(iRawlen == 0);    if (iRawlen)    {      ((mng_showp)*ppChunk)->iFirstid  = mng_get_uint16 (pRawdata);      if (iRawlen > 2)        ((mng_showp)*ppChunk)->iLastid = mng_get_uint16 (pRawdata+2);      if (iRawlen > 4)        ((mng_showp)*ppChunk)->iMode   = *(pRawdata+4);    }  }#endif /* MNG_STORE_CHUNKS */#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_READ_SHOW, MNG_LC_END)#endif  return MNG_NOERROR;                  /* done */}