X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/244381e68bc408f6313b05a02bdac347dff048b3..7c4625ef998807f077925afb853299edf2fd5202:/usr/src/usr.bin/ex/ex3.7preserve/ex3.7preserve.c diff --git a/usr/src/usr.bin/ex/ex3.7preserve/ex3.7preserve.c b/usr/src/usr.bin/ex/ex3.7preserve/ex3.7preserve.c index c915b6bc14..29344680b3 100644 --- a/usr/src/usr.bin/ex/ex3.7preserve/ex3.7preserve.c +++ b/usr/src/usr.bin/ex/ex3.7preserve/ex3.7preserve.c @@ -1,4 +1,5 @@ -/* Copyright (c) 1979 Regents of the University of California */ +/* Copyright (c) 1980 Regents of the University of California */ +static char *sccsid = "@(#)ex3.7preserve.c 4.2 %G%"; #include #include #include @@ -7,6 +8,12 @@ #include #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 @@ -24,13 +31,21 @@ * temporaries. */ +#ifndef VMUNIX #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 */ +#ifndef VMUNIX 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; @@ -170,7 +185,7 @@ 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