freebsd-ports/math/physcalc/files/patch-ac
Will Andrews 76a432dd93 Add physcalc (unversioned), an extremely old (apparently first written
in 1990), but still quite useful and flexible calculator.  Basically it's
units(1) on steroids.  Also added patches to make physcalc secure (who
knows, someone might make a cgi interface to it); also allowed it to
actually read its *.phy files in another directory.

Submitted/Requested by:	gsutter
gets() -> fgets() code:	eivind
SHAREDIR code:		Marius Bendiksen <mbendiks@eunet.no>
2000-08-27 23:32:03 +00:00

21 lines
441 B
Plaintext

--- 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);
}
}