summaryrefslogtreecommitdiffstats
path: root/biology/seqio/files
diff options
context:
space:
mode:
authorwjv <wjv@FreeBSD.org>2001-08-22 12:07:26 +0000
committerwjv <wjv@FreeBSD.org>2001-08-22 12:07:26 +0000
commitc0ddec2a4784a9681947bd700c1baa7a6d52f9d6 (patch)
tree2f97665b63caeaa536a5314b89fd0f375c49c374 /biology/seqio/files
parent15a0d416459c0eb7b7752c2528dba83b7864d730 (diff)
downloadFreeBSD-ports-c0ddec2a4784a9681947bd700c1baa7a6d52f9d6.zip
FreeBSD-ports-c0ddec2a4784a9681947bd700c1baa7a6d52f9d6.tar.gz
Add seqio 1.2.2, a set of C functions which can read/write
biological sequence files. PR: 29922 Submitted by: Tony Maher <tonym@biolateral.com.au>
Diffstat (limited to 'biology/seqio/files')
-rw-r--r--biology/seqio/files/patch-Makefile11
-rw-r--r--biology/seqio/files/patch-fmtseq117
-rw-r--r--biology/seqio/files/patch-grepseq155
-rw-r--r--biology/seqio/files/patch-seqio18
4 files changed, 301 insertions, 0 deletions
diff --git a/biology/seqio/files/patch-Makefile b/biology/seqio/files/patch-Makefile
new file mode 100644
index 0000000..0efbc6f
--- /dev/null
+++ b/biology/seqio/files/patch-Makefile
@@ -0,0 +1,11 @@
+--- Makefile.orig Tue Aug 21 12:50:44 2001
++++ Makefile Tue Aug 21 12:51:13 2001
+@@ -12,7 +12,7 @@
+ CFLAGS= -g -O2 -Wall -Wshadow
+
+
+-all: grepseq fmtseq idxseq typeseq wcseq examples
++all: grepseq fmtseq idxseq typeseq wcseq
+
+ grepseq: grepseq.o seqio.o
+ $(CC) $(CFLAGS) -o grepseq grepseq.o seqio.o
diff --git a/biology/seqio/files/patch-fmtseq b/biology/seqio/files/patch-fmtseq
new file mode 100644
index 0000000..a11d021
--- /dev/null
+++ b/biology/seqio/files/patch-fmtseq
@@ -0,0 +1,117 @@
+--- fmtseq.c.orig Wed Jul 10 12:58:39 1996
++++ fmtseq.c Tue Aug 21 13:17:23 2001
+@@ -37,7 +37,6 @@
+ #include <sys/stat.h>
+ #include "seqio.h"
+
+-extern char *sys_errlist[];
+
+
+ #ifdef WIN32
+@@ -70,6 +69,7 @@
+ #define ASK 2
+ #define ITEMLIST 3
+
++#define MAXLINE 128
+
+ int pretty_flag, pretty_count;
+ FILE *fpout;
+@@ -81,7 +81,7 @@
+ } pretty;
+
+
+-char dna_complement[128], rna_complement[128];
++char dna_complement[MAXLINE], rna_complement[MAXLINE];
+
+
+ /*
+@@ -222,7 +222,7 @@
+ void print_options(int flag)
+ {
+ int i, j;
+- char line[128];
++ char line[MAXLINE];
+
+ printf("Program Options (text in [...] is optional):\n");
+ printf(" -al[l] select all sequences\n");
+@@ -249,7 +249,7 @@
+
+ if (flag) {
+ printf("More? ");
+- gets(line);
++ fgets(line,MAXLINE-1,stdin);
+ if (line[0] == 'q' || line[0] == 'Q')
+ return;
+ }
+@@ -264,7 +264,7 @@
+
+ if (flag) {
+ printf("More? ");
+- gets(line);
++ fgets(line,MAXLINE-1,stdin);
+ if (line[0] == 'q' || line[0] == 'Q')
+ return;
+ }
+@@ -1646,7 +1646,7 @@
+ s = line;
+ while (*s == '\0') {
+ printf("Enter: ");
+- gets(line);
++ fgets(line,MAXLINE-1,stdin);
+ for (s=line; *s && isspace(*s); s++) ;
+ }
+ printf("----------------------\n\n");
+@@ -1701,7 +1701,7 @@
+ {
+ static char defch = 'y';
+ int init_print, count;
+- char *s, *entry, *eptr, line[128];
++ char *s, *entry, *eptr, line[MAXLINE];
+
+ putchar('\n');
+ if (seqcount == 1) {
+@@ -1717,7 +1717,7 @@
+ eptr = entry = NULL;
+ while (1) {
+ printf("Select? [%c] ", defch);
+- gets(line);
++ fgets(line,MAXLINE-1,stdin);
+
+ if (line[0] == '\0')
+ line[0] = defch;
+@@ -1771,7 +1771,7 @@
+ SEQINFO *info, int mode)
+ {
+ int len;
+- char *temp, tempbuffer[128];
++ char *temp, tempbuffer[MAXLINE];
+
+ if (buf != NULL)
+ temp = buf;
+@@ -1803,7 +1803,7 @@
+
+ int pretty_store(char *seq, int seqlen, SEQINFO *info)
+ {
+- char buffer[128];
++ char buffer[MAXLINE];
+
+ if (pretty_count == psize) {
+ if (psize == 0) {
+@@ -2582,7 +2582,7 @@
+
+ void blastout_store(SEQFILE *sfp, char *seq, int seqlen, SEQINFO *info)
+ {
+- static otherstrand = 0;
++ static int otherstrand = 0;
+ int pos, al_start, ingap, len;
+ char *s, *t1, *entry, *end, *line1, *line2;
+ ALIGN newalign;
+@@ -3017,7 +3017,7 @@
+ {
+ int i;
+
+- for (i=0; i < 128; i++)
++ for (i=0; i < MAXLINE; i++)
+ dna_complement[i] = dna_complement[i] = i;
+
+ dna_complement['a'] = 't'; dna_complement['A'] = 'T';
diff --git a/biology/seqio/files/patch-grepseq b/biology/seqio/files/patch-grepseq
new file mode 100644
index 0000000..a501901
--- /dev/null
+++ b/biology/seqio/files/patch-grepseq
@@ -0,0 +1,155 @@
+--- grepseq.c.orig Sat Aug 18 16:19:15 2001
++++ grepseq.c Sat Aug 18 16:37:58 2001
+@@ -18,7 +18,6 @@
+ #include <string.h>
+ #include "seqio.h"
+
+-extern char *sys_errlist[];
+
+ #define ASCII 4
+
+@@ -475,7 +474,7 @@
+ ascii_alpha_mask[num] |= mask;
+ }
+ else
+- ascii_alpha_mask[*s] |= mask;
++ ascii_alpha_mask[(int) *s] |= mask;
+ break;
+
+ case '.':
+@@ -518,7 +517,7 @@
+ ascii_alpha_mask[num] |= mask;
+ }
+ else
+- ascii_alpha_mask[*s] |= mask;
++ ascii_alpha_mask[(int) *s] |= mask;
+ }
+ else {
+ if (dna_flag) {
+@@ -526,17 +525,17 @@
+ dna_flag = 0;
+ else
+ for ( ; *t; t++)
+- dna_alpha_mask[*t] |= mask;
++ dna_alpha_mask[(int) *t] |= mask;
+ }
+ if (prt_flag) {
+ if ((t = prt_expand(*s)) == NULL)
+ prt_flag = 0;
+ else
+ for ( ; *t; t++)
+- prt_alpha_mask[*t] |= mask;
++ prt_alpha_mask[(int) *t] |= mask;
+ }
+
+- ascii_alpha_mask[*s] |= mask;
++ ascii_alpha_mask[(int) *s] |= mask;
+ }
+ }
+
+@@ -557,17 +556,17 @@
+ dna_flag = 0;
+ else
+ for ( ; *t; t++)
+- dna_alpha_mask[*t] |= mask;
++ dna_alpha_mask[(int) *t] |= mask;
+ }
+ if (prt_flag) {
+ if ((t = prt_expand(*s)) == NULL)
+ prt_flag = 0;
+ else
+ for ( ; *t; t++)
+- prt_alpha_mask[*t] |= mask;
++ prt_alpha_mask[(int) *t] |= mask;
+ }
+
+- ascii_alpha_mask[*s] |= mask;
++ ascii_alpha_mask[(int) *s] |= mask;
+ }
+
+ /*
+@@ -677,16 +676,16 @@
+ */
+ if (num_errors == 0) {
+ score = 0;
+- while ((ch = *s) && table[ch] &&
+- !((masklist0 = ((masklist0 << 1) & alpha_mask[*s]) + 1) &
++ while ((ch = *s) && table[(int) ch] &&
++ !((masklist0 = ((masklist0 << 1) & alpha_mask[(int) *s]) + 1) &
+ accept_mask))
+ s++;
+ }
+ else if (num_errors == 1) {
+ score = -1;
+ if (misonly_flag) {
+- while ((ch = *s) && table[ch]) {
+- chmask = alpha_mask[ch];
++ while ((ch = *s) && table[(int) ch]) {
++ chmask = alpha_mask[(int) ch];
+ last_mask = masklist0;
+ masklist0 = ((masklist0 << 1) & chmask) + 1;
+ masklist1 = ((masklist1 << 1) & chmask) | (last_mask << 1);
+@@ -703,8 +702,8 @@
+ }
+ }
+ else {
+- while ((ch = *s) && table[ch]) {
+- chmask = alpha_mask[ch];
++ while ((ch = *s) && table[(int) ch]) {
++ chmask = alpha_mask[(int) ch];
+ last_mask = masklist0;
+ masklist0 = ((masklist0 << 1) & chmask) + 1;
+ masklist1 = ((masklist1 << 1) & chmask) | /* match */
+@@ -727,8 +726,8 @@
+ else if (num_errors == 2) {
+ score = -1;
+ if (misonly_flag) {
+- while ((ch = *s) && table[ch]) {
+- chmask = alpha_mask[ch];
++ while ((ch = *s) && table[(int) ch]) {
++ chmask = alpha_mask[(int) ch];
+ last_mask = masklist0;
+ masklist0 = ((masklist0 << 1) & chmask) + 1;
+ newmask = ((masklist1 << 1) & chmask) | (last_mask << 1);
+@@ -752,8 +751,8 @@
+ }
+ }
+ else {
+- while ((ch = *s) && table[ch]) {
+- chmask = alpha_mask[ch];
++ while ((ch = *s) && table[(int) ch]) {
++ chmask = alpha_mask[(int) ch];
+ last_mask = masklist0;
+ masklist0 = ((masklist0 << 1) & chmask) + 1;
+ newmask = ((masklist1 << 1) & chmask) | /* match */
+@@ -785,8 +784,8 @@
+ }
+ else if (misonly_flag) {
+ score = -1;
+- while ((ch = *s) && table[ch]) {
+- chmask = alpha_mask[ch];
++ while ((ch = *s) && table[(int) ch]) {
++ chmask = alpha_mask[(int) ch];
+
+ last_mask = masklist[0];
+ masklist[0] = ((masklist[0] << 1) & chmask) + 1;
+@@ -808,8 +807,8 @@
+ }
+ else {
+ score = -1;
+- while ((ch = *s) && table[ch]) {
+- chmask = alpha_mask[ch];
++ while ((ch = *s) && table[(int) ch]) {
++ chmask = alpha_mask[(int) ch];
+
+ last_mask = masklist[0];
+ masklist[0] = ((masklist[0] << 1) & chmask) + 1;
+@@ -835,7 +834,7 @@
+
+ if (!ch)
+ break;
+- else if (!table[ch]) {
++ else if (!table[(int) ch]) {
+ fprintf(stderr, "%s, entry %d: Sequence contains invalid characters.\n",
+ seqffilename(sfp, 0), seqfentryno(sfp));
+ return NULL;
diff --git a/biology/seqio/files/patch-seqio b/biology/seqio/files/patch-seqio
new file mode 100644
index 0000000..3e637eb
--- /dev/null
+++ b/biology/seqio/files/patch-seqio
@@ -0,0 +1,18 @@
+--- seqio.c.orig Sat Aug 18 16:20:53 2001
++++ seqio.c Sat Aug 18 16:21:23 2001
+@@ -147,7 +147,6 @@
+ * files, and replacement functions for system calls that don't exist on
+ * one or more machines.
+ */
+-extern char *sys_errlist[];
+
+ #if defined(__sun) && !defined(FILENAME_MAX)
+ #include <sys/param.h>
+@@ -158,7 +157,6 @@
+ static int ctype_initflag = 0;
+ static char tubuf[384], *tuary;
+
+-#define toupper(chr) tuary[(int) (chr)]
+
+ static void init_ctype(void)
+ {
OpenPOWER on IntegriCloud