release 3.2, Jan 4, 1980
[unix-history] / usr / src / usr.bin / ex / ex3.7preserve / ex3.7preserve.c
index c915b6b..373aa69 100644 (file)
@@ -7,6 +7,12 @@
 #include <pwd.h>
 #include "local/uparm.h"
 
 #include <pwd.h>
 #include "local/uparm.h"
 
+#ifdef VMUNIX
+#define        HBLKS   2
+#else
+#define        HBLKS   1
+#endif
+
 /*
  * Expreserve - preserve a file in usrpath(preserve)
  * Bill Joy UCB November 13, 1977
 /*
  * Expreserve - preserve a file in usrpath(preserve)
  * Bill Joy UCB November 13, 1977
  *      temporaries.
  */
 
  *      temporaries.
  */
 
+#ifndef VMUNIX
 #define        LBLKS   125
 #define        LBLKS   125
+#else
+#define        LBLKS   900
+#endif
 #define        FNSIZE  128
 
 struct         header {
        time_t  Time;                   /* Time temp file last updated */
        short   Uid;                    /* This users identity */
 #define        FNSIZE  128
 
 struct         header {
        time_t  Time;                   /* Time temp file last updated */
        short   Uid;                    /* This users identity */
+#ifndef VMUNIX
        short   Flines;                 /* Number of lines in file */
        short   Flines;                 /* Number of lines in file */
+#else
+       int     Flines;
+#endif
        char    Savedfile[FNSIZE];      /* The current file name */
        short   Blocks[LBLKS];          /* Blocks where line pointers stashed */
 } H;
        char    Savedfile[FNSIZE];      /* The current file name */
        short   Blocks[LBLKS];          /* Blocks where line pointers stashed */
 } H;
@@ -170,7 +184,7 @@ format:
 #endif
                goto format;
        }
 #endif
                goto format;
        }
-       if (H.Blocks[0] != 1 || H.Blocks[1] != 2) {
+       if (H.Blocks[0] != HBLKS || H.Blocks[1] != HBLKS+1) {
 #ifdef DEBUG
                fprintf(stderr, "Blocks %d %d\n", H.Blocks[0], H.Blocks[1]);
 #endif
 #ifdef DEBUG
                fprintf(stderr, "Blocks %d %d\n", H.Blocks[0], H.Blocks[1]);
 #endif