⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 libmng_chunk_prc.c

📁 奇趣公司比较新的qt/emd版本
💻 C
📖 第 1 页 / 共 5 页
字号:
#ifndef MNG_SKIPCHUNK_eXPIFREE_CHUNK_HDR (mng_free_expi){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_EXPI, MNG_LC_START);#endif  if (((mng_expip)pHeader)->iNamesize)    MNG_FREEX (pData, ((mng_expip)pHeader)->zName,                      ((mng_expip)pHeader)->iNamesize + 1);#ifndef MNG_OPTIMIZE_CHUNKINITFREE  MNG_FREEX (pData, pHeader, sizeof (mng_expi));#endif#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_EXPI, MNG_LC_END);#endif#ifndef MNG_OPTIMIZE_CHUNKINITFREE  return MNG_NOERROR;#else  return mng_free_general(pData, pHeader);#endif}#endif/* ************************************************************************** */#ifndef MNG_OPTIMIZE_CHUNKINITFREE#ifndef MNG_SKIPCHUNK_fPRIFREE_CHUNK_HDR (mng_free_fpri){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_FPRI, MNG_LC_START);#endif  MNG_FREEX (pData, pHeader, sizeof (mng_fpri));#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_FPRI, MNG_LC_END);#endif  return MNG_NOERROR;}#endif#endif/* ************************************************************************** */#ifndef MNG_SKIPCHUNK_nEEDFREE_CHUNK_HDR (mng_free_need){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_NEED, MNG_LC_START);#endif  if (((mng_needp)pHeader)->iKeywordssize)    MNG_FREEX (pData, ((mng_needp)pHeader)->zKeywords,                      ((mng_needp)pHeader)->iKeywordssize + 1);#ifndef MNG_OPTIMIZE_CHUNKINITFREE  MNG_FREEX (pData, pHeader, sizeof (mng_need));#endif#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_NEED, MNG_LC_END);#endif#ifndef MNG_OPTIMIZE_CHUNKINITFREE  return MNG_NOERROR;#else  return mng_free_general(pData, pHeader);#endif}#endif/* ************************************************************************** */#ifndef MNG_OPTIMIZE_CHUNKINITFREE#ifndef MNG_SKIPCHUNK_pHYgFREE_CHUNK_HDR (mng_free_phyg){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_PHYG, MNG_LC_START);#endif  MNG_FREEX (pData, pHeader, sizeof (mng_phyg));#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_PHYG, MNG_LC_END);#endif  return MNG_NOERROR;}#endif#endif/* ************************************************************************** */#ifndef MNG_OPTIMIZE_CHUNKINITFREE#ifdef MNG_INCLUDE_JNGFREE_CHUNK_HDR (mng_free_jhdr){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_JHDR, MNG_LC_START);#endif  MNG_FREEX (pData, pHeader, sizeof (mng_jhdr));#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_JHDR, MNG_LC_END);#endif  return MNG_NOERROR;}#endif /* MNG_INCLUDE_JNG */#endif/* ************************************************************************** */#ifdef MNG_INCLUDE_JNGFREE_CHUNK_HDR (mng_free_jdaa){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_JDAA, MNG_LC_START);#endif  if (((mng_jdaap)pHeader)->iDatasize)    MNG_FREEX (pData, ((mng_jdaap)pHeader)->pData,                      ((mng_jdaap)pHeader)->iDatasize);#ifndef MNG_OPTIMIZE_CHUNKINITFREE  MNG_FREEX (pData, pHeader, sizeof (mng_jdaa));#endif#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_JDAA, MNG_LC_END);#endif#ifndef MNG_OPTIMIZE_CHUNKINITFREE  return MNG_NOERROR;#else  return mng_free_general(pData, pHeader);#endif}#endif /* MNG_INCLUDE_JNG *//* ************************************************************************** */#ifdef MNG_INCLUDE_JNGFREE_CHUNK_HDR (mng_free_jdat){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_JDAT, MNG_LC_START);#endif  if (((mng_jdatp)pHeader)->iDatasize)    MNG_FREEX (pData, ((mng_jdatp)pHeader)->pData,                      ((mng_jdatp)pHeader)->iDatasize);#ifndef MNG_OPTIMIZE_CHUNKINITFREE  MNG_FREEX (pData, pHeader, sizeof (mng_jdat));#endif#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_JDAT, MNG_LC_END);#endif#ifndef MNG_OPTIMIZE_CHUNKINITFREE  return MNG_NOERROR;#else  return mng_free_general(pData, pHeader);#endif}#endif /* MNG_INCLUDE_JNG *//* ************************************************************************** */#ifndef MNG_OPTIMIZE_CHUNKINITFREE#ifdef MNG_INCLUDE_JNGFREE_CHUNK_HDR (mng_free_jsep){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_JSEP, MNG_LC_START);#endif  MNG_FREEX (pData, pHeader, sizeof (mng_jsep));#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_JSEP, MNG_LC_END);#endif  return MNG_NOERROR;}#endif /* MNG_INCLUDE_JNG */#endif/* ************************************************************************** */#ifndef MNG_OPTIMIZE_CHUNKINITFREE#ifndef MNG_NO_DELTA_PNGFREE_CHUNK_HDR (mng_free_dhdr){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_DHDR, MNG_LC_START);#endif  MNG_FREEX (pData, pHeader, sizeof (mng_dhdr));#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_DHDR, MNG_LC_END);#endif  return MNG_NOERROR;}#endif#endif/* ************************************************************************** */#ifndef MNG_OPTIMIZE_CHUNKINITFREE#ifndef MNG_NO_DELTA_PNGFREE_CHUNK_HDR (mng_free_prom){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_PROM, MNG_LC_START);#endif  MNG_FREEX (pData, pHeader, sizeof (mng_prom));#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_PROM, MNG_LC_END);#endif  return MNG_NOERROR;}#endif#endif/* ************************************************************************** */#ifndef MNG_OPTIMIZE_CHUNKINITFREE#ifndef MNG_NO_DELTA_PNGFREE_CHUNK_HDR (mng_free_ipng){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_IPNG, MNG_LC_START);#endif  MNG_FREEX (pData, pHeader, sizeof (mng_ipng));#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_IPNG, MNG_LC_END);#endif  return MNG_NOERROR;}#endif#endif/* ************************************************************************** */#ifndef MNG_OPTIMIZE_CHUNKINITFREE#ifndef MNG_NO_DELTA_PNGFREE_CHUNK_HDR (mng_free_pplt){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_PPLT, MNG_LC_START);#endif  MNG_FREEX (pData, pHeader, sizeof (mng_pplt));#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_PPLT, MNG_LC_END);#endif  return MNG_NOERROR;}#endif#endif/* ************************************************************************** */#ifndef MNG_OPTIMIZE_CHUNKINITFREE#ifndef MNG_NO_DELTA_PNG#ifdef MNG_INCLUDE_JNGFREE_CHUNK_HDR (mng_free_ijng){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_IJNG, MNG_LC_START);#endif  MNG_FREEX (pData, pHeader, sizeof (mng_ijng));#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_IJNG, MNG_LC_END);#endif  return MNG_NOERROR;}#endif#endif#endif/* ************************************************************************** */#ifndef MNG_NO_DELTA_PNGFREE_CHUNK_HDR (mng_free_drop){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_DROP, MNG_LC_START);#endif  if (((mng_dropp)pHeader)->iCount)    MNG_FREEX (pData, ((mng_dropp)pHeader)->pChunknames,                      ((mng_dropp)pHeader)->iCount * sizeof (mng_chunkid) );#ifndef MNG_OPTIMIZE_CHUNKINITFREE  MNG_FREEX (pData, pHeader, sizeof (mng_drop));#endif#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_DROP, MNG_LC_END);#endif#ifndef MNG_OPTIMIZE_CHUNKINITFREE  return MNG_NOERROR;#else  return mng_free_general(pData, pHeader);#endif}#endif/* ************************************************************************** */#ifndef MNG_NO_DELTA_PNG#ifndef MNG_SKIPCHUNK_DBYKFREE_CHUNK_HDR (mng_free_dbyk){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_DBYK, MNG_LC_START);#endif  if (((mng_dbykp)pHeader)->iKeywordssize)    MNG_FREEX (pData, ((mng_dbykp)pHeader)->zKeywords,                      ((mng_dbykp)pHeader)->iKeywordssize);#ifndef MNG_OPTIMIZE_CHUNKINITFREE  MNG_FREEX (pData, pHeader, sizeof (mng_dbyk));#endif#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_DBYK, MNG_LC_END);#endif#ifndef MNG_OPTIMIZE_CHUNKINITFREE  return MNG_NOERROR;#else  return mng_free_general(pData, pHeader);#endif}#endif#endif/* ************************************************************************** */#ifndef MNG_NO_DELTA_PNG#ifndef MNG_SKIPCHUNK_ORDRFREE_CHUNK_HDR (mng_free_ordr){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_ORDR, MNG_LC_START);#endif  if (((mng_ordrp)pHeader)->iCount)    MNG_FREEX (pData, ((mng_ordrp)pHeader)->pEntries,                      ((mng_ordrp)pHeader)->iCount * sizeof (mng_ordr_entry) );#ifndef MNG_OPTIMIZE_CHUNKINITFREE  MNG_FREEX (pData, pHeader, sizeof (mng_ordr));#endif#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_ORDR, MNG_LC_END);#endif#ifndef MNG_OPTIMIZE_CHUNKINITFREE  return MNG_NOERROR;#else  return mng_free_general(pData, pHeader);#endif}#endif#endif/* ************************************************************************** */#ifndef MNG_OPTIMIZE_CHUNKINITFREE#ifndef MNG_SKIPCHUNK_MAGNFREE_CHUNK_HDR (mng_free_magn){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_MAGN, MNG_LC_START);#endif  MNG_FREEX (pData, pHeader, sizeof (mng_magn));#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_MAGN, MNG_LC_END);#endif  return MNG_NOERROR;}#endif#endif/* ************************************************************************** */#ifndef MNG_SKIPCHUNK_evNTFREE_CHUNK_HDR (mng_free_evnt){  mng_evnt_entryp pEntry = ((mng_evntp)pHeader)->pEntries;  mng_uint32      iX;#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_EVNT, MNG_LC_START);#endif  for (iX = 0; iX < ((mng_evntp)pHeader)->iCount; iX++)  {    if (pEntry->iSegmentnamesize)      MNG_FREEX (pData, pEntry->zSegmentname, pEntry->iSegmentnamesize+1);    pEntry++;  }  if (((mng_evntp)pHeader)->iCount)    MNG_FREEX (pData, ((mng_evntp)pHeader)->pEntries,                      ((mng_evntp)pHeader)->iCount * sizeof (mng_evnt_entry) );#ifndef MNG_OPTIMIZE_CHUNKINITFREE  MNG_FREEX (pData, pHeader, sizeof (mng_evnt));#endif#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_EVNT, MNG_LC_END);#endif#ifndef MNG_OPTIMIZE_CHUNKINITFREE  return MNG_NOERROR;#else  return mng_free_general(pData, pHeader);#endif}#endif/* ************************************************************************** */FREE_CHUNK_HDR (mng_free_unknown){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_UNKNOWN, MNG_LC_START);#endif  if (((mng_unknown_chunkp)pHeader)->iDatasize)    MNG_FREEX (pData, ((mng_unknown_chunkp)pHeader)->pData,                      ((mng_unknown_chunkp)pHeader)->iDatasize);#ifndef MNG_OPTIMIZE_CHUNKINITFREE  MNG_FREEX (pData, pHeader, sizeof (mng_unknown_chunk));#endif#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_FREE_UNKNOWN, MNG_LC_END);#endif#ifndef MNG_OPTIMIZE_CHUNKINITFREE  return MNG_NOERROR;#else  return mng_free_general(pData, pHeader);#endif}/* ************************************************************************** *//* *                                                                        * *//* * Chunk specific copy routines                                           * *//* *                                                                        * *//* ************************************************************************** */#ifdef MNG_INCLUDE_WRITE_PROCS/* ************************************************************************** */#ifdef MNG_OPTIMIZE_CHUNKASSIGNASSIGN_CHUNK_HDR (mng_assign_general){  mng_ptr    pSrc = (mng_uint8p)pChunkfrom + sizeof (mng_chunk_header);  mng_ptr    pDst = (mng_uint8p)pChunkto   + sizeof (mng_chunk_header);  mng_size_t iLen = ((mng_chunk_headerp)pChunkfrom)->iChunksize - sizeof (mng_chunk_header);  MNG_COPY (pDst, pSrc, iLen);  return MNG_NOERROR;}#endif/* ************************************************************************** */#ifndef MNG_OPTIMIZE_CHUNKASSIGNASSIGN_CHUNK_HDR (mng_assign_ihdr){#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_ASSIGN_IHDR, MNG_LC_START);#endif  if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_IHDR)    MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */  ((mng_ihdrp)pChunkto)->iWidth       = ((mng_ihdrp)pChunkfrom)->iWidth;  ((mng_ihdrp)p

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -