head	1.3;
access;
symbols
	RELEASE_7_0_0:1.2
	RELEASE_6_3_0:1.2
	PRE_XORG_7:1.2
	RELEASE_4_EOL:1.2
	RELEASE_6_2_0:1.2
	RELEASE_6_1_0:1.2
	RELEASE_5_5_0:1.2
	RELEASE_6_0_0:1.2
	RELEASE_5_4_0:1.2
	RELEASE_4_11_0:1.2
	RELEASE_5_3_0:1.2
	RELEASE_4_10_0:1.2
	RELEASE_5_2_1:1.2
	RELEASE_5_2_0:1.2
	RELEASE_4_9_0:1.2
	RELEASE_5_1_0:1.2
	RELEASE_4_8_0:1.2
	RELEASE_5_0_0:1.1
	RELEASE_4_7_0:1.1
	RELEASE_4_6_2:1.1
	RELEASE_4_6_1:1.1
	RELEASE_4_6_0:1.1
	RELEASE_5_0_DP1:1.1;
locks; strict;
comment	@# @;


1.3
date	2007.12.15.18.47.00;	author pav;	state dead;
branches;
next	1.2;

1.2
date	2003.02.15.18.43.14;	author naddy;	state Exp;
branches;
next	1.1;

1.1
date	2002.03.22.08.23.22;	author wjv;	state Exp;
branches;
next	;


desc
@@


1.3
log
@- Update to 2.0

PR:		ports/117713
Submitted by:	Motomichi Matsuzaki <mzaki@@e-mail.ne.jp>
@
text
@--- util.c.orig	Thu Feb 13 16:19:35 2003
+++ util.c	Thu Feb 13 16:21:40 2003
@@@@ -171,10 +171,11 @@@@
 	return str;
 }
 
-void getstr(char *instr,char *outstr)
+void getstr(char *instr,char *outstr, int len)
 {	
 	fprintf(stdout,"%s: ",instr);
-	gets(outstr);
+	fgets(outstr, len, stdin);
+	outstr[strlen(outstr)-1] = '\0';
 }
 
 double getreal(char *instr,double minx,double maxx,double def)
@@@@ -185,7 +186,7 @@@@
 	
 	while(TRUE) {
 		fprintf(stdout,"%s (%.1f-%.1f)   [%.1f]: ",instr,minx,maxx,def);
-		gets(line);
+		fgets(line, MAXLINE, stdin);
 		status=sscanf(line,"%f",&ret);
 		if(status == EOF) return def;
 		if(ret>maxx) {
@@@@ -210,7 +211,7 @@@@
 	while(TRUE) {
 		fprintf(stdout,"%s (%d..%d)    [%d]: ",
 		instr,(pint)minx,(pint)maxx,(pint)def);
-		gets(line);
+		fgets(line, MAXLINE, stdin);
 		status=sscanf(line,"%d",&ret);
 		if(status == EOF) return def;
 		if(ret>maxx) {
@@@@ -230,7 +231,7 @@@@
 {
 	char line[MAXLINE];
 	
-	getstr("\n\nEnter system command",line);
+	getstr("\n\nEnter system command",line,MAXLINE);
 	if(*line != EOS)
 		system(line);
 	fprintf(stdout,"\n\n");
@


1.2
log
@Update to 1.83.

PR:		48264
Submitted by:	David A. Bader <dbader@@eece.unm.edu>
@
text
@@


1.1
log
@- Fix certain mistakes in FreeBSD patches
- Bump PORTREVISION
- Poroblem originally reported by Fernan Aguero <fernan@@iib.unsam.edu.ar> on
  FreeBSD-bio list

PR:		36169
Submitted by:	David A. Bader <dbader@@eece.unm.edu> (MAINTAINER)
@
text
@d1 3
a3 3
--- util.c-orig	Thu Mar 21 10:15:59 2002
+++ util.c	Thu Mar 21 10:17:11 2002
@@@@ -171,10 +171,10 @@@@
d13 1
d17 1
a17 1
@@@@ -185,7 +185,7 @@@@
d26 1
a26 1
@@@@ -210,7 +210,7 @@@@
d35 1
a35 1
@@@@ -230,7 +230,7 @@@@
@

