if (pData->bDisplaying)
READ_CHUNK (read_hist){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_READ_HIST, MNG_LC_START)#endif                                       /* sequence checks */  if ((!pData->bHasIHDR) && (!pData->bHasBASI) && (!pData->bHasDHDR)    )    MNG_ERROR (pData, MNG_SEQUENCEERROR)  if ((!pData->bHasPLTE) || (pData->bHasIDAT))    MNG_ERROR (pData, MNG_SEQUENCEERROR)                                       /* length oke ? */  if ( ((iRawlen & 0x01) != 0) || ((iRawlen >> 1) != pData->iPLTEcount) )    MNG_ERROR (pData, MNG_INVALIDLENGTH)#ifdef MNG_SUPPORT_DISPLAY  if (pData->bDisplaying)  {    /* TODO: something !!! */  }#endif /* MNG_SUPPORT_DISPLAY */#ifdef MNG_STORE_CHUNKS  if (pData->bStorechunks)  {    mng_uint32 iX;                                       /* 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_histp)*ppChunk)->iEntrycount = iRawlen >> 1;    for (iX = 0; iX < (iRawlen >> 1); iX++)    {      ((mng_histp)*ppChunk)->aEntries [iX] = mng_get_uint16 (pRawdata);      pRawdata += 2;    }  }#endif /* MNG_STORE_CHUNKS */#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_READ_HIST, MNG_LC_END)#endif  return MNG_NOERROR;                  /* done */}