home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / jove-4.16-src.tgz / tar.out / bsd / jove / recover.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  1KB  |  42 lines

  1. /************************************************************************
  2.  * This program is Copyright (C) 1986-1996 by Jonathan Payne.  JOVE is  *
  3.  * provided to you without charge, and with no warranty.  You may give  *
  4.  * away copies of JOVE, including sources, provided that this notice is *
  5.  * included in all the files.                                           *
  6.  ************************************************************************/
  7.  
  8. #ifdef RECOVER    /* the body is the rest of this file */
  9.  
  10. /* Format of records within the jrec file: information to allow
  11.  * recovery from a crash.
  12.  *
  13.  * Note: the recovery info is
  14.  * (1) architecture dependent -- it contains ints, among other things
  15.  * (2) version dependent -- this format started in 4.15.16
  16.  * (3) configuration dependent -- affected by any change to FILESIZE
  17.  */
  18.  
  19. # define RECMAGIC    -(('J' << 8) + 1)    /* JOVE recovery file, version 1 */
  20.  
  21. struct rec_head {
  22.     short    RecMagic;    /* (partial) compatibility check */
  23. # ifdef UNIX
  24.     int        Uid;        /* uid of owner */
  25.     pid_t        Pid;        /* pid of jove process */
  26. # endif
  27.     char        TmpFileName[FILESIZE];    /* name of corresponding tempfile */
  28.     time_t        UpdTime;    /* last time this was updated */
  29.     int        Nbuffers;    /* number of buffers */
  30.     daddr        FreePtr;    /* position of DFree */
  31. };
  32.  
  33. struct rec_entry {
  34.     char    r_bname[FILESIZE],
  35.         r_fname[FILESIZE];
  36.     int    r_nlines,
  37.         r_dotline,    /* so we can really save the context */
  38.         r_dotchar;
  39. };
  40.  
  41. #endif /* RECOVER */
  42.