aboutsummaryrefslogtreecommitdiff
path: root/math/physcalc
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2009-06-26 11:25:37 +0000
committerPav Lucistnik <pav@FreeBSD.org>2009-06-26 11:25:37 +0000
commit73aa4fd5f4b8659c2d827c388798e92d7fe20e9c (patch)
tree6bef0aa0f9035f9f7da2651d2b9b787f020d0708 /math/physcalc
parent6067b6b4012f8fe7a80cc8b5eddecec5fa712803 (diff)
downloadports-73aa4fd5f4b8659c2d827c388798e92d7fe20e9c.tar.gz
ports-73aa4fd5f4b8659c2d827c388798e92d7fe20e9c.zip
- The path to the .phy files was built up using un-zero'd memory, so it could
(and did, for me) break in strange and unexpected ways. - EOF on input (e.g., ^D) would cause it to loop forever. PR: ports/136060 Submitted by: Matthew D. Fuller <fullermd@over-yonder.net>
Notes
Notes: svn path=/head/; revision=236655
Diffstat (limited to 'math/physcalc')
-rw-r--r--math/physcalc/Makefile1
-rw-r--r--math/physcalc/files/patch-ab6
-rw-r--r--math/physcalc/files/patch-ac9
3 files changed, 9 insertions, 7 deletions
diff --git a/math/physcalc/Makefile b/math/physcalc/Makefile
index b38a65469271..946e6c0c02c6 100644
--- a/math/physcalc/Makefile
+++ b/math/physcalc/Makefile
@@ -7,6 +7,7 @@
PORTNAME= physcalc
PORTVERSION= 2.4
+PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= ftp://ftp.lightlink.com/pub/vulcan/
DISTNAME= ${PORTNAME}
diff --git a/math/physcalc/files/patch-ab b/math/physcalc/files/patch-ab
index ed9696eae996..179a6a6b4eac 100644
--- a/math/physcalc/files/patch-ab
+++ b/math/physcalc/files/patch-ab
@@ -1,5 +1,5 @@
---- physconv.c Sun Aug 27 17:57:24 2000
-+++ physconv.c.new Sun Aug 27 18:03:58 2000
+--- physconv.c.orig 1998-08-30 15:58:16.000000000 -0500
++++ physconv.c 2009-06-25 22:22:21.000000000 -0500
@@ -260,12 +260,16 @@
{ /* read in lines from fp and do each as if typed from console */
FILE *fp;
@@ -11,7 +11,7 @@
#endif
- if ((fp = fopen(s,"r"))==NULL) {
-+ fullpath = malloc( strlen( SHAREDIR ) + strlen( s ) + 1 );
++ fullpath = calloc( strlen( SHAREDIR ) + strlen( s ) + 1, 1 );
+ bcopy(SHAREDIR, fullpath, strlen(SHAREDIR));
+ (void) strcat(fullpath, s);
+ if ((fp = fopen(fullpath,"r"))==NULL) {
diff --git a/math/physcalc/files/patch-ac b/math/physcalc/files/patch-ac
index 46131c9eff22..c76d57866f58 100644
--- a/math/physcalc/files/patch-ac
+++ b/math/physcalc/files/patch-ac
@@ -1,5 +1,5 @@
---- physmain.c Sun Aug 27 17:55:04 2000
-+++ physmain.c.new Sun Aug 27 17:55:53 2000
+--- physmain.c.orig 1998-08-30 14:48:34.000000000 -0500
++++ physmain.c 2009-06-25 22:32:46.000000000 -0500
@@ -227,7 +227,7 @@
printf("Replace %s = ",v->name);
printexpr(v->value);
@@ -9,12 +9,13 @@
printf("\n");
} else
answer[0] = 'Y';
-@@ -711,7 +711,7 @@
+@@ -711,7 +711,8 @@
} else
while (TRUE) {
printf(">");
- gets(buf);
-+ fgets(buf, sizeof(buf), stdin);
++ if(fgets(buf, sizeof(buf), stdin) == NULL)
++ exit(0);
do_cmd(buf);
}
}