Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Aug 2003 00:28:15 +0800
From:      "=?big5?B?Q2h1bi1UaWVuIENoYW5nIFwosWmnZ6TRXCk=?=" <tcs@kitty.2y.net>
To:        <dbader@eece.unm.edu>
Cc:        ports@FreeBSD.org
Subject:   FreeBSD Port: clustalw-1.83
Message-ID:  <000001c36a5c$f88cd320$af58728c@PENGUIN>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_0003_01C36A9F.C615D610
Content-Type: text/plain;
	charset="big5"
Content-Transfer-Encoding: quoted-printable

Hi.

The fgets keep the "\n" at end of line.
Maybe we need to remove it.
The attachment is my patch-ac
It will make user to input a correct output filename.

thx.
------=_NextPart_000_0003_01C36A9F.C615D610
Content-Type: application/octet-stream;
	name="clustalw.patch-ac.my"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="clustalw.patch-ac.my"

--- interface.c.orig	Thu Feb 13 15:17:33 2003=0A=
+++ interface.c	Thu Feb 13 15:26:28 2003=0A=
@@ -1132,7 +1132,7 @@=0A=
 	/* added for File System Standards  - Francois */=0A=
 	path1=3D(char *)ckalloc((strlen(path)+64)*sizeof(char));=0A=
 	strcpy(path1,path);=0A=
-	strcat(path1,"/usr/share/clustalx:/usr/local/share/clustalx"); =0A=
+	strcat(path1,DATADIR); =0A=
 =0A=
         lf=3D(sint)strlen(fname);=0A=
         deb=3Dpath1;=0A=
@@ -1224,7 +1224,7 @@=0A=
 				if(strstr(temp, help_marker)){=0A=
 				  	if(usemenu) {=0A=
 						fprintf(stdout,"\n");=0A=
-				    		getstr("Press [RETURN] to continue",lin2);=0A=
+				    		getstr("Press [RETURN] to continue",lin2,MAXLINE);=0A=
 				  	}=0A=
 					fclose(help_file);=0A=
 					return;=0A=
@@ -1236,7 +1236,7 @@=0A=
 			       if(usemenu) {=0A=
 			          if(nlines >=3D PAGE_LEN) {=0A=
 				     	   fprintf(stdout,"\n");=0A=
-			 	  	   getstr("Press [RETURN] to continue or  X  to stop",lin2);=0A=
+			 	  	   getstr("Press [RETURN] to continue or  X  to =
stop",lin2,MAXLINE);=0A=
 				  	   if(toupper(*lin2) =3D=3D 'X') {=0A=
 						   fclose(help_file);=0A=
 						   return;=0A=
@@ -1248,7 +1248,7 @@=0A=
 			}=0A=
 			if(usemenu) {=0A=
 				fprintf(stdout,"\n");=0A=
-				getstr("Press [RETURN] to continue",lin2);=0A=
+				getstr("Press [RETURN] to continue",lin2,MAXLINE);=0A=
 			}=0A=
 			fclose(help_file);=0A=
 		}=0A=
@@ -1287,7 +1287,7 @@=0A=
                 ++nlines;=0A=
                 if(nlines >=3D PAGE_LEN) {=0A=
                         fprintf(stdout,"\n");=0A=
-                        getstr("Press [RETURN] to continue or  X  to =
stop",lin2);=0A=
+                        getstr("Press [RETURN] to continue or  X  to =
stop",lin2,MAXLINE);=0A=
                         if(toupper(*lin2) =3D=3D 'X') {=0A=
                                 fclose(file);=0A=
                                 return;=0A=
@@ -1298,7 +1298,7 @@=0A=
         }=0A=
         fclose(file);=0A=
         fprintf(stdout,"\n");=0A=
-        getstr("Press [RETURN] to continue",lin2);=0A=
+        getstr("Press [RETURN] to continue",lin2,MAXLINE);=0A=
 }=0A=
 =0A=
 =0A=
@@ -1747,7 +1747,7 @@=0A=
         FILE *infile;=0A=
 =0A=
         if(usemenu)=0A=
-                getstr("Enter name of the matrix file",lin2);=0A=
+                getstr("Enter name of the matrix file",lin2,MAXLINE);=0A=
         else=0A=
                 strcpy(lin2,str);=0A=
 =0A=
@@ -1773,7 +1773,7 @@=0A=
         FILE *infile;=0A=
 =0A=
         if(usemenu)=0A=
-                getstr("Enter name of the matrix file",lin2);=0A=
+                getstr("Enter name of the matrix file",lin2,MAXLINE);=0A=
         else=0A=
                 strcpy(lin2,str);=0A=
 =0A=
@@ -2176,7 +2176,7 @@=0A=
 			strcpy(local_prompt,"\n\nEnter new name to avoid overwriting ");=0A=
 			strcat(local_prompt," [%s]: ");          =0A=
 			fprintf(stdout,local_prompt,file_name);=0A=
-			gets(temp);=0A=
+			fgets(temp,FILENAMELEN+1,stdin); if(*temp !=3D EOS) =
temp[strlen(temp)-1]=3DEOS;=0A=
 			if(*temp !=3D EOS) strcpy(file_name,temp);=0A=
 		}=0A=
 	}=0A=
@@ -2184,7 +2184,7 @@=0A=
 		strcpy(local_prompt,prompt);=0A=
 		strcat(local_prompt," [%s]: ");          =0A=
 		fprintf(stdout,local_prompt,file_name);=0A=
-		gets(temp);=0A=
+		fgets(temp,FILENAMELEN+1,stdin); if(*temp !=3D EOS) =
temp[strlen(temp)-1]=3DEOS;=0A=
 		if(*temp !=3D EOS) strcpy(file_name,temp);=0A=
 	}=0A=
 =0A=
@@ -2385,7 +2385,7 @@=0A=
 		if (usemenu)=0A=
             	fprintf(stdout,"\nUse the existing GUIDE TREE file,  %s  =
(y/n) ? [y]: ",=0A=
                                            tree_name);=0A=
-                gets(temp);=0A=
+                fgets(temp,MAXLINE,stdin); if(*temp !=3D EOS) =
temp[strlen(temp)-1]=3DEOS;=0A=
                 if(*temp !=3D 'n' && *temp !=3D 'N') {=0A=
                     strcpy(phylip_name,tree_name);=0A=
                     use_tree =3D TRUE;=0A=
@@ -2617,7 +2617,7 @@=0A=
 =0A=
             fprintf(stdout,"\nEnter a name for the guide tree file =
[%s]: ",=0A=
                                            phylip_name);=0A=
-                	gets(temp);=0A=
+			fgets(temp,MAXLINE,stdin); if(*temp !=3D EOS) =
temp[strlen(temp)-1]=3DEOS;=0A=
                 	if(*temp !=3D EOS)=0A=
                         	strcpy(phylip_name,temp);=0A=
         	}=0A=
@@ -2719,7 +2719,7 @@=0A=
 #endif=0A=
             	fprintf(stdout,"\nUse the existing GUIDE TREE file for =
Profile 1,  %s  (y/n) ? [y]: ",=0A=
                                            tree_name);=0A=
-                gets(temp);=0A=
+                fgets(temp,MAXLINE,stdin); if(*temp !=3D EOS) =
temp[strlen(temp)-1]=3DEOS;=0A=
                 if(*temp !=3D 'n' && *temp !=3D 'N') {=0A=
                     strcpy(p1_tree_name,tree_name);=0A=
                     use_tree1 =3D TRUE;=0A=
@@ -2745,7 +2745,7 @@=0A=
 #endif=0A=
             	fprintf(stdout,"\nUse the existing GUIDE TREE file for =
Profile 2,  %s  (y/n) ? [y]: ",=0A=
                                            tree_name);=0A=
-                gets(temp);=0A=
+                fgets(temp,MAXLINE,stdin); if(*temp !=3D EOS) =
temp[strlen(temp)-1]=3DEOS;=0A=
                 if(*temp !=3D 'n' && *temp !=3D 'N') {=0A=
                     strcpy(p2_tree_name,tree_name);=0A=
                     use_tree2 =3D TRUE;=0A=
@@ -4203,7 +4203,7 @@=0A=
   if(usemenu) {=0A=
     fprintf(stdout,"\nEnter a name for the parameter output file [%s]: =
",=0A=
 	    parname);=0A=
-    gets(temp);=0A=
+    fgets(temp,FILENAMELEN+1,stdin); if(*temp !=3D EOS) =
temp[strlen(temp)-1]=3DEOS;=0A=
     if(*temp !=3D EOS)=0A=
       strcpy(parname,temp);=0A=
   }=0A=

------=_NextPart_000_0003_01C36A9F.C615D610--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000001c36a5c$f88cd320$af58728c>