Subversion Repositories pentevo

Rev

Blame | Last modification | View Log | Download | RSS feed | ?url?

  1. #ifndef _CODECHUNKS_H
  2. #define _CODECHUNKS_H
  3. /* codechunks.h */
  4. /*****************************************************************************/
  5. /* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only                     */
  6. /*                                                                           */
  7. /* AS-Portierung                                                             */
  8. /*                                                                           */
  9. /* Maintain address ranges & included code                                   */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12.  
  13. #include "datatypes.h"
  14.  
  15. typedef struct
  16. {
  17.   LargeWord Start, Length;
  18.   unsigned Granularity;
  19.   LongWord *pLongCode;
  20.   Word *pWordCode;
  21.   Byte *pCode;
  22. } tCodeChunk;
  23.  
  24. typedef struct
  25. {
  26.   Word RealLen, AllocLen;
  27.   tCodeChunk *Chunks;
  28. } tCodeChunkList;
  29.  
  30. extern void InitCodeChunk(tCodeChunk *pChunk);
  31. extern int ReadCodeChunk(tCodeChunk *pChunk, const char *pFileName, LargeWord Start, LargeWord Length, unsigned Granularity);
  32. extern void FreeCodeChunk(tCodeChunk *pChunk);
  33.  
  34. extern void InitCodeChunkList(tCodeChunkList *pCodeChunkList);
  35. extern int MoveCodeChunkToList(tCodeChunkList *pCodeChunkList, tCodeChunk *pNewCodeChunk, Boolean WarnOverlap);
  36. extern void FreeCodeChunkList(tCodeChunkList *pCodeChunkList);
  37. extern Boolean RetrieveCodeFromChunkList(const tCodeChunkList *pCodeChunkList, LargeWord Start, Byte *pData, unsigned Count);
  38.  
  39. extern LargeWord GetCodeChunksStored(const tCodeChunkList *pCodeChunkList);
  40.  
  41. #endif /* _CODECHUNKS_H */
  42.