home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / plbin.zip / pl / src / pl-save.h < prev    next >
Text File  |  1993-02-18  |  1KB  |  35 lines

  1. /*  pl-save.h,v 1.3 1993/02/18 15:16:33 jan Exp
  2.  
  3.     Copyright (c) 1991 Jan Wielemaker. All rights reserved.
  4.     jan@swi.psy.uva.nl
  5.  
  6.     Purpose: pl-save.c exports
  7. */
  8.  
  9. #define S_DATA        1    /* Data section */
  10. #define S_TEXT        2    /* Incrementally loaded text */
  11. #define S_CSTACK    3    /* C-stack section */
  12. #define S_PLSTACK    4    /* Prolog-stack section */
  13.  
  14. #define RET_RETURN    1    /* save/1 */
  15. #define RET_MAIN    2    /* save_program/[1,2] */
  16.  
  17. #define SAVE_FAILURE    0    /* save() failed */
  18. #define SAVE_SAVE    1    /* save() successfully saved state */
  19. #define SAVE_RESTORE    2    /* save() success after restore() */
  20.  
  21. #define MAX_SAVE_SECTIONS 50    /* for machines without alloca() */
  22.  
  23. typedef void * caddr;        /* anonymous address */
  24.  
  25. typedef struct save_section
  26. { caddr    start;            /* Start address in memory */
  27.   long  length;            /* Length in bytes */
  28.   long  offset;            /* Offset in the file */
  29.   short type;            /* Which section is this? */
  30.   short    flags;            /* Various flags */
  31. } * SaveSection;
  32.  
  33. int    save P((char *, char *, int, int, SaveSection));
  34. int    restore P((char *, int (*allocf)(SaveSection)));
  35.