aboutsummaryrefslogtreecommitdiff
path: root/shells/v7sh/files/patch-blok.c
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-06-22 08:24:19 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-06-22 08:24:19 +0000
commit6b787b91fc0797ed15597e469b619422097a60bb (patch)
treea1b95711a4085320a1bc7b8bb0ee0183fb21ec47 /shells/v7sh/files/patch-blok.c
parent534f473cd50799533fb3e86a963522014804aa19 (diff)
Notes
Diffstat (limited to 'shells/v7sh/files/patch-blok.c')
-rw-r--r--shells/v7sh/files/patch-blok.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/shells/v7sh/files/patch-blok.c b/shells/v7sh/files/patch-blok.c
new file mode 100644
index 000000000000..349fb063d801
--- /dev/null
+++ b/shells/v7sh/files/patch-blok.c
@@ -0,0 +1,41 @@
+diff -u -x CVS -x work -x core -x *.core -x #* -x *~ -x *.orig -x *.rej -I $Id.*$ -I $.+BSD.*$ blok.c.orig blok.c
+--- blok.c.orig Fri Jun 4 02:51:00 2004
++++ blok.c Sat Jun 19 18:42:21 2004
+@@ -18,9 +18,9 @@
+ #define BUSY 01
+ #define busy(x) (Rcheat((x)->word)&BUSY)
+
+-POS brkincr=BRKINCR;
+-BLKPTR blokp; /*current search pointer*/
+-BLKPTR bloktop=BLK(end); /*top of arena (last blok)*/
++INT brkincr=BRKINCR;
++LOCAL BLKPTR blokp; /*current search pointer*/
++LOCAL BLKPTR bloktop=BLK(end); /*top of arena (last blok)*/
+
+
+
+@@ -34,13 +34,13 @@
+ REG BLKPTR q;
+ REP IF !busy(p)
+ THEN WHILE !busy(q = p->word) DO p->word = q->word OD
+- IF ADR(q)-ADR(p) >= rbytes
++ IF (POS) (ADR(q)-ADR(p)) >= rbytes
+ THEN blokp = BLK(ADR(p)+rbytes);
+ IF q > blokp
+ THEN blokp->word = p->word;
+ FI
+ p->word=BLK(Rcheat(blokp)|BUSY);
+- return(ADR(p+1));
++ return((ADDRESS) ADR(p+1));
+ FI
+ FI
+ q = p; p = BLK(Rcheat(p->word)&~BUSY);
+@@ -57,7 +57,7 @@
+ REG BLKPTR blokstak;
+
+ pushstak(0);
+- rndstak=round(staktop,BYTESPERWORD);
++ rndstak=(STKPTR) round(staktop,BYTESPERWORD);
+ blokstak=BLK(stakbas)-1;
+ blokstak->word=stakbsy; stakbsy=blokstak;
+ bloktop->word=BLK(Rcheat(rndstak)|BUSY);