aboutsummaryrefslogtreecommitdiff
path: root/games/csmash
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2005-05-06 18:17:10 +0000
committerEric Anholt <anholt@FreeBSD.org>2005-05-06 18:17:10 +0000
commit96bbb5fd3012633e2f41e8fe1de5de6a1f6e8798 (patch)
tree5c770e9a14f34f4c09f26c08e7a18095f710a303 /games/csmash
parentdbe20fb172afb8240e0da345d7e2e50ead14855b (diff)
downloadports-96bbb5fd3012633e2f41e8fe1de5de6a1f6e8798.tar.gz
ports-96bbb5fd3012633e2f41e8fe1de5de6a1f6e8798.zip
Notes
Diffstat (limited to 'games/csmash')
-rw-r--r--games/csmash/files/patch-loadparts.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/games/csmash/files/patch-loadparts.cpp b/games/csmash/files/patch-loadparts.cpp
index cab4e05cc796..c9d438a737a9 100644
--- a/games/csmash/files/patch-loadparts.cpp
+++ b/games/csmash/files/patch-loadparts.cpp
@@ -1,11 +1,12 @@
--- loadparts.cpp.orig Wed May 4 19:19:33 2005
-+++ loadparts.cpp Wed May 4 19:19:48 2005
-@@ -245,7 +245,7 @@
++++ loadparts.cpp Fri May 6 11:11:49 2005
+@@ -69,8 +69,7 @@
+ return a <= x && x <= b;
+ }
- while ('\\' == line[l-1]) {
- // concat next line(s)
-- int bufsize = clamp(0U, sizeof(line)-l, sizeof(line)-1);
-+ int bufsize = clamp(0UL, sizeof(line)-l, sizeof(line)-1);
- fgets(&line[l-2], bufsize, fp);
- if (feof((FILE*)fp)) break;
- l = strlen(line);
+-template <typename T>
+-inline const T& clamp(const T& a, const T& x, const T& b) {
++inline const long clamp(long a, long x, long b) {
+ if (a > x) return a;
+ elif (b < x) return b;
+ else return x;