aboutsummaryrefslogtreecommitdiff
path: root/math/physcalc/files
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2000-08-27 23:32:03 +0000
committerWill Andrews <will@FreeBSD.org>2000-08-27 23:32:03 +0000
commit76a432dd93757fc8826bc04bf00ea7b0155a6779 (patch)
tree0f8c8f15cf26e4dee59bd62cec0cb688a5ba90d3 /math/physcalc/files
parenta36c404a5914f1cb2671d87fc8d71c073607381f (diff)
downloadports-76a432dd93757fc8826bc04bf00ea7b0155a6779.tar.gz
ports-76a432dd93757fc8826bc04bf00ea7b0155a6779.zip
Notes
Diffstat (limited to 'math/physcalc/files')
-rw-r--r--math/physcalc/files/patch-aa13
-rw-r--r--math/physcalc/files/patch-ab29
-rw-r--r--math/physcalc/files/patch-ac20
3 files changed, 62 insertions, 0 deletions
diff --git a/math/physcalc/files/patch-aa b/math/physcalc/files/patch-aa
new file mode 100644
index 000000000000..96b25217a20d
--- /dev/null
+++ b/math/physcalc/files/patch-aa
@@ -0,0 +1,13 @@
+--- physcalc.h Sun Aug 27 17:46:31 2000
++++ physcalc.h.new Sun Aug 27 17:46:57 2000
+@@ -22,6 +22,10 @@
+ #error This program requires more memory than the tiny model allows!
+ #endif
+
++#ifndef SHAREDIR
++#define SHAREDIR "/usr/share/physcalc/"
++#endif
++
+ #define VERSION "2.4" /* Version number */
+ #define TRACE
+
diff --git a/math/physcalc/files/patch-ab b/math/physcalc/files/patch-ab
new file mode 100644
index 000000000000..ed9696eae996
--- /dev/null
+++ b/math/physcalc/files/patch-ab
@@ -0,0 +1,29 @@
+--- physconv.c Sun Aug 27 17:57:24 2000
++++ physconv.c.new Sun Aug 27 18:03:58 2000
+@@ -260,12 +260,16 @@
+ { /* read in lines from fp and do each as if typed from console */
+ FILE *fp;
+ char buf[SMALLBUF];
++ char *fullpath;
+ int oldecho;
+ #ifdef TRACE
+ int oldtrace;
+ #endif
+
+- if ((fp = fopen(s,"r"))==NULL) {
++ fullpath = malloc( strlen( SHAREDIR ) + strlen( s ) + 1 );
++ bcopy(SHAREDIR, fullpath, strlen(SHAREDIR));
++ (void) strcat(fullpath, s);
++ if ((fp = fopen(fullpath,"r"))==NULL) {
+ printf("Can't open %s\n",s);
+ return;
+ }
+@@ -797,7 +801,7 @@
+ } else {
+ showdims(&d);
+ printf("Convert to: ");
+- gets(buf);
++ fgets(buf, sizeof(buf), stdin);
+ trimspc(buf);
+ if (buf[0]=='?') {
+ showdims(&d);
diff --git a/math/physcalc/files/patch-ac b/math/physcalc/files/patch-ac
new file mode 100644
index 000000000000..46131c9eff22
--- /dev/null
+++ b/math/physcalc/files/patch-ac
@@ -0,0 +1,20 @@
+--- physmain.c Sun Aug 27 17:55:04 2000
++++ physmain.c.new Sun Aug 27 17:55:53 2000
+@@ -227,7 +227,7 @@
+ printf("Replace %s = ",v->name);
+ printexpr(v->value);
+ printf(" ?");
+- gets(answer);
++ fgets(answer, sizeof(answer), stdin);
+ printf("\n");
+ } else
+ answer[0] = 'Y';
+@@ -711,7 +711,7 @@
+ } else
+ while (TRUE) {
+ printf(">");
+- gets(buf);
++ fgets(buf, sizeof(buf), stdin);
+ do_cmd(buf);
+ }
+ }