diff options
author | Cem Keylan <cem@ckyln.com> | 2020-08-23 00:27:53 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-08-23 00:27:53 +0300 |
commit | a7ed7cd4e92b9f9e4a88244086d21cc18e37e088 (patch) | |
tree | 720d17fe0c54afebf8e4377a350557e5a7823a04 /editors/nvi/patches/nvi-18-dbpagesize_binpower.patch | |
parent | a30159f101aa153c00327f647e425fa5c0d03ffd (diff) | |
download | repository-a7ed7cd4e92b9f9e4a88244086d21cc18e37e088.tar.gz |
nvi: add new package at 1.81.6
Diffstat (limited to 'editors/nvi/patches/nvi-18-dbpagesize_binpower.patch')
-rw-r--r-- | editors/nvi/patches/nvi-18-dbpagesize_binpower.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/editors/nvi/patches/nvi-18-dbpagesize_binpower.patch b/editors/nvi/patches/nvi-18-dbpagesize_binpower.patch new file mode 100644 index 0000000..0fabbc6 --- /dev/null +++ b/editors/nvi/patches/nvi-18-dbpagesize_binpower.patch @@ -0,0 +1,25 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 18dbpagesize_binpower.dpatch by <hesso@pool.math.tu-berlin.de> +## +## DP: Make sure that the pagesize passed to db__set_pagesize() is +## DP: a power of two. + +@DPATCH@ +--- nvi-1.81.6.orig/common/exf.c 2009-03-09 01:48:01.695862889 +0100 ++++ nvi-1.81.6/common/exf.c 2009-03-09 10:42:41.147866272 +0100 +@@ -249,11 +249,10 @@ + * (vi should have good locality) or smaller than 1K. + */ + psize = ((sb.st_size / 15) + 1023) / 1024; +- if (psize > 10) +- psize = 10; +- if (psize == 0) +- psize = 1; +- psize *= 1024; ++ if (psize >= 8) psize=8<<10; ++ else if (psize >= 4) psize=4<<10; ++ else if (psize >= 2) psize=2<<10; ++ else psize=1<<10; + + F_SET(ep, F_DEVSET); + ep->mdev = sb.st_dev; |