File: 01sm_src_tigr.diff

package info (click to toggle)
mummer 3.20-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 5,156 kB
  • ctags: 2,042
  • sloc: cpp: 13,011; ansic: 7,530; perl: 4,140; makefile: 360; sh: 48; csh: 44; awk: 17
file content (103 lines) | stat: -rw-r--r-- 2,911 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
diff -urbN src/tigr.orig/annotate.cc src/tigr/annotate.cc
--- src/tigr.orig/annotate.cc	2007-07-13 19:06:58.000000000 +0200
+++ src/tigr/annotate.cc	2007-11-07 21:47:03.000000000 +0100
@@ -10,6 +10,7 @@
 */
 
 #include "tigrinc.hh"
+#include <assert.h>
 
 #define  FIELD_LEN  20
 #define  MAX_ALIGN  10000
@@ -138,19 +139,19 @@
 //  Print the alignment between strings  A [1 .. M]  and  B [1 .. N] .
 
   {
-   static int  D [MAX_ALIGN] [MAX_ALIGN];
-   static char  Op [MAX_ALIGN] [MAX_ALIGN];
-   static char  Show_A [2 * MAX_ALIGN];
-   static char  Show_B [2 * MAX_ALIGN];
+   int  **D,  *D_buf;
+   char **Op, *Op_buf;
+   char  *Show_A;
+   char  *Show_B;
    int  Errors, Tmp;
    long int  i, j, Ct;
 
-   if  (M >= MAX_ALIGN || N >= MAX_ALIGN)
-       {
-        printf ("\n   *** Too long ***\n\n");
-        fprintf (Gaps_With_Errors_File, "%s %7s\n", Line, "-");
-        return;
-       }
+   assert ( D_buf  = (int  *) calloc ( (M+1)*(N+1), sizeof(int) ) ) ;
+   D  = &D_buf ;
+   assert ( Op_buf = (char *) calloc ( (M+1)*(N+1), sizeof(char) ) ) ;
+   Op = &Op_buf ;
+   assert ( Show_A = (char *) calloc ( 2*(M+1) , sizeof(char) ) ) ;
+   assert ( Show_B = (char *) calloc ( 2*(N+1) , sizeof(char) ) ) ;
 
    D [0] [0] = 0;
    Op [0] [0] = 'a';
@@ -229,5 +230,10 @@
       putchar ('\n');
       Ct -= WIDTH;
      }  while  (Ct > 0);
+
+   free ( D_buf ) ;
+   free ( Op_buf ) ;
+   free ( Show_A ) ;
+   free ( Show_B ) ;
    return;
   }
diff -urbN src/tigr.orig/Makefile src/tigr/Makefile
--- src/tigr.orig/Makefile	2007-07-13 19:06:58.000000000 +0200
+++ src/tigr/Makefile	2007-11-07 21:47:03.000000000 +0100
@@ -2,23 +2,20 @@
 # BIN_DIR AUX_BIN_DIR CXX CC CPPFLAGS LDFLAGS
 
 ifndef BIN_DIR
-BIN_DIR := $(CURDIR)
+BIN_DIR := ../../bin
 endif
 ifndef AUX_BIN_DIR
-AUX_BIN_DIR := $(CURDIR)
+AUX_BIN_DIR := ../../aux_bin
 endif
 
 OBJ_RULE = $(CXX) $(CPPFLAGS) $< -c -o $@
-BIN_RULE = $(CXX) $(CPPFLAGS) $^ -o $(BIN_DIR)/$@; \
-           chmod 755 $(BIN_DIR)/$@
-AUX_BIN_RULE = $(CXX) $(CPPFLAGS) $^ -o $(AUX_BIN_DIR)/$@; \
-           chmod 755 $(AUX_BIN_DIR)/$@
+BIN_RULE = $(CXX) $(CPPFLAGS) $^ -o $(BIN_DIR)/$@ && chmod 755 $(BIN_DIR)/$@
+AUX_BIN_RULE = $(CXX) $(CPPFLAGS) $^ -o $(AUX_BIN_DIR)/$@ && chmod 755 $(AUX_BIN_DIR)/$@
 VPATH := $(AUX_BIN_DIR):$(BIN_DIR)
 
 ALL := annotate combineMUMs delta-filter gaps mgaps \
      postnuc postpro prenuc prepro repeat-match \
-     show-aligns show-coords show-tiling show-snps \
-     show-diff
+     show-aligns show-coords show-tiling show-snps
 
 
 #-- PHONY rules --#
@@ -30,10 +27,8 @@
 
 clean:
 	rm -f *.o *~
-	cd $(BIN_DIR); rm -f $(ALL)
-	cd $(AUX_BIN_DIR); rm -f $(ALL)
-
-
+	( cd $(BIN_DIR) && rm -f $(ALL) )
+	( cd $(AUX_BIN_DIR) && rm -f $(ALL) )
 
 
 #-- not so PHONY rules --#
@@ -92,5 +87,3 @@
 show-snps: show-snps.cc tigrinc.o translate.o delta.o
 	$(BIN_RULE)
 
-show-diff: show-diff.cc tigrinc.o delta.o
-	$(BIN_RULE)