Remove unused patches
Andreas Tille
5 years ago
0 | Description: add soname to linker call in Makefile | |
1 | Upstream Makefile does not build a shared object with soname or version | |
2 | number. This patch adds support for sonames, as well a symlink from | |
3 | the .so to the .so.X file. | |
4 | Author: Sascha Steinbiss <steinbiss@zbh.uni-hamburg.de> | |
5 | --- a/Makefile | |
6 | +++ b/Makefile | |
7 | @@ -191,7 +191,7 @@ | |
8 | # add necessary shared lib dependencies then not building them ourselves | |
9 | ifeq ($(useshared),yes) | |
10 | DEPLIBS:=-lbz2 -lz -lexpat -llua5.1-lpeg -llua5.1 -llua5.1-md5 \ | |
11 | - -llua5.1-filesystem -llua5.1-des56 -lbam | |
12 | + -llua5.1-filesystem -llua5.1-des56 -lbam -ltre | |
13 | else | |
14 | DEPLIBS:= | |
15 | endif |
0 | Description: Do not use -m64 in arm64. | |
1 | Author: Sascha Steinbiss <steinbiss@zbh.uni-hamburg.de> | |
2 | --- a/Makefile | |
3 | +++ b/Makefile | |
4 | @@ -308,7 +308,7 @@ | |
5 | endif | |
6 | ||
7 | ifeq ($(m64),yes) | |
8 | - ifeq (,$(filter $(MACHINE),ia64 alpha mips64 mips64el)) | |
9 | + ifeq (,$(filter $(MACHINE),ia64 alpha mips64 mips64el aarch64)) | |
10 | GT_CFLAGS += -m64 | |
11 | GT_LDFLAGS += -m64 | |
12 | SQLITE_CFLAGS += -m64 |
0 | Description: Adapt code to work with char being unsigned by default. | |
1 | Author: Sascha Steinbiss <steinbiss@zbh.uni-hamburg.de> | |
2 | --- a/src/core/safearith.c | |
3 | +++ b/src/core/safearith.c | |
4 | @@ -182,8 +182,10 @@ | |
5 | gt_error_check(err); | |
6 | ||
7 | { | |
8 | + /* This is not always true, e.g. on PPC and ARM! | |
9 | + cf. http://www.network-theory.co.uk/docs/gccintro/gccintro_71.html | |
10 | gt_ensure(__MIN(char) == -128); | |
11 | - gt_ensure(__MAX(char) == 127); | |
12 | + gt_ensure(__MAX(char) == 127); */ | |
13 | gt_ensure(__MIN(unsigned char) == 0); | |
14 | gt_ensure(__MAX(unsigned char) == 255); | |
15 | ||
16 | --- a/src/core/tokenizer.c | |
17 | +++ b/src/core/tokenizer.c | |
18 | @@ -45,7 +45,9 @@ | |
19 | ||
20 | GtStr* gt_tokenizer_get_token(GtTokenizer *t) | |
21 | { | |
22 | - char c = EOF; | |
23 | + char c; | |
24 | + bool has_eof = true; | |
25 | + int rval = 0; | |
26 | gt_assert(t); | |
27 | ||
28 | /* if we have no current token, get it if possible */ | |
29 | @@ -53,32 +55,44 @@ | |
30 | if (t->skip_comment_lines && gt_io_line_start(t->io)) { | |
31 | for (;;) { | |
32 | gt_assert(gt_io_line_start(t->io)); | |
33 | - if ((gt_io_get_char(t->io, &c) != -1)) { | |
34 | - if (c == '#') { | |
35 | + if ((gt_io_get_char(t->io, (char*) &c) != -1)) { | |
36 | + if ((char) c == '#') { | |
37 | /* skip line */ | |
38 | while ((gt_io_get_char(t->io, &c) != -1) && c != '\n'); | |
39 | - c = EOF; | |
40 | + has_eof = true; | |
41 | } | |
42 | else { | |
43 | gt_io_unget_char(t->io, c); | |
44 | + has_eof = false; | |
45 | break; | |
46 | } | |
47 | } | |
48 | - else | |
49 | + else { | |
50 | + c = EOF; | |
51 | break; | |
52 | + } | |
53 | } | |
54 | - } | |
55 | - while ((gt_io_get_char(t->io, &c) != -1) && c == ' '); /* skip blanks */ | |
56 | + } /* skip blanks */ | |
57 | + while (((rval = gt_io_get_char(t->io, &c)) != -1) && c == ' '); | |
58 | + if (rval == -1) | |
59 | + has_eof = true; | |
60 | + else | |
61 | + has_eof = false; | |
62 | do { | |
63 | - if (c != EOF) { | |
64 | + if (!has_eof) { | |
65 | if (!t->token) | |
66 | t->token = gt_str_new(); | |
67 | if (c == '\n') | |
68 | break; | |
69 | gt_str_append_char(t->token, c); | |
70 | } | |
71 | - } while ((gt_io_get_char(t->io, &c) != -1) && c != ' ' && c != '\n'); | |
72 | - if (c == '\n' && c != EOF) { | |
73 | + } while (((rval = gt_io_get_char(t->io, &c)) != -1) | |
74 | + && c != ' ' && c != '\n'); | |
75 | + if (rval == -1) | |
76 | + has_eof = true; | |
77 | + else | |
78 | + has_eof = false; | |
79 | + if (c == '\n' && !has_eof) { | |
80 | gt_assert(t->token); | |
81 | gt_str_append_char(t->token, c); | |
82 | } | |
83 | --- a/src/core/tokenizer.h | |
84 | +++ b/src/core/tokenizer.h | |
85 | @@ -33,7 +33,7 @@ | |
86 | bool gt_tokenizer_has_token(GtTokenizer*); | |
87 | bool gt_tokenizer_line_start(const GtTokenizer*); | |
88 | void gt_tokenizer_next_token(GtTokenizer*); /* go to the next token */ | |
89 | -GtUword gt_tokenizer_get_line_number(const GtTokenizer*); | |
90 | +GtUword gt_tokenizer_get_line_number(const GtTokenizer*); | |
91 | const char* gt_tokenizer_get_filename(const GtTokenizer*); | |
92 | int gt_tokenizer_unit_test(GtError*); | |
93 | void gt_tokenizer_delete(GtTokenizer*); | |
94 | --- a/src/core/trans_table.c | |
95 | +++ b/src/core/trans_table.c | |
96 | @@ -21,7 +21,7 @@ | |
97 | #include "core/ma.h" | |
98 | #include "core/trans_table.h" | |
99 | ||
100 | -#define GT_AMINOACIDFAIL -1 | |
101 | +#define GT_AMINOACIDFAIL ((char) 0) | |
102 | ||
103 | /* The integer which a T is encoded to. */ | |
104 | #define GT_T_CODE 0 | |
105 | --- a/src/extended/gff3_escaping.c | |
106 | +++ b/src/extended/gff3_escaping.c | |
107 | @@ -64,7 +64,8 @@ | |
108 | unsigned char d; | |
109 | gt_assert(str && out); | |
110 | if (!(GtIsHexChar[(int) *(str+1)] & 2) | |
111 | - || !(GtIsHexChar[(int) *(str+2)] & 1)) { | |
112 | + || !(GtIsHexChar[(int) *(str+2)] & 1) | |
113 | + || !strncmp(str, "%7F", 3 * (sizeof (char)))) { | |
114 | return -1; | |
115 | } | |
116 | d = (GtHexToDec[(int) *(str+1)] << 4) | (GtHexToDec[(int) *(str+2)]); |
0 | Description: change test caption to be less problematic | |
1 | Author: Sascha Steinbiss <satta@debian.org> | |
2 | Origin: https://github.com/genometools/genometools/commit/d86b83dda1eb43a5adf27f831b103f817e1dc48f#commitcomment-20423074 | |
3 | --- a/testdata/gt_sketch_textwidth.gff3 | |
4 | +++ b/testdata/gt_sketch_textwidth.gff3 | |
5 | @@ -1,6 +1,6 @@ | |
6 | ##gff-version 3 | |
7 | ##sequence-region ctg123 1 1497228 | |
8 | ctg123 . gene 1000 2000 . + 0 ID=g00001;Name=thisisalongname123 | |
9 | -ctg123 . gene 2001 3000 . + 0 ID=g00002;Name=anotherlongname123 | |
10 | +ctg123 . gene 2001 3000 . + 0 ID=g00002;Name=anotherlongname | |
11 | ctg123 . gene 3001 4000 . + 0 ID=g00003;Name=stillanotherlonglonglonglonglonglonglongname | |
12 | ctg123 . gene 4001 5000 . + 0 ID=g00004;Name=shortname |
0 | From 3bf0e31b3a020c415d99d8661c5aca32647c7a6f Mon Sep 17 00:00:00 2001 | |
1 | From: Sascha Steinbiss <ss34@sanger.ac.uk> | |
2 | Date: Thu, 7 Apr 2016 10:25:25 +0100 | |
3 | Subject: [PATCH] introduce dates for manuals | |
4 | ||
5 | IMHO manuals should have a specific date, and the build date should not be | |
6 | relevant here. This commit initialises the date fields in the manuals by | |
7 | setting the date to the last modification date of the file in git, as | |
8 | given by: | |
9 | ||
10 | for f in doc/manuals/*.tex; do | |
11 | export OUT=`TZ=UTC LC_ALL=C date -d "$(git log -1 --format='%aD' -- $f )" +'%d\/%m\/%Y'`; | |
12 | sed -ri "s/.begin.document./\\\date{$OUT}\n\\\begin{document}/g" $f; | |
13 | unset OUT; | |
14 | done | |
15 | --- | |
16 | doc/manuals/annotationsketch.tex | 1 + | |
17 | doc/manuals/genomediff.tex | 1 + | |
18 | doc/manuals/hop.tex | 1 + | |
19 | doc/manuals/ltrdigest.tex | 1 + | |
20 | doc/manuals/ltrharvest.tex | 1 + | |
21 | doc/manuals/mgth.tex | 1 + | |
22 | doc/manuals/packedindex.tex | 1 + | |
23 | doc/manuals/readjoiner.tex | 1 + | |
24 | doc/manuals/repfind.tex | 1 + | |
25 | doc/manuals/tagerator.tex | 1 + | |
26 | doc/manuals/tallymer.tex | 1 + | |
27 | doc/manuals/uniquesub.tex | 1 + | |
28 | 12 files changed, 12 insertions(+) | |
29 | ||
30 | --- a/doc/manuals/annotationsketch.tex | |
31 | +++ b/doc/manuals/annotationsketch.tex | |
32 | @@ -50,6 +50,7 @@ | |
33 | \subject{Supplementary Information} | |
34 | \author{Sascha Steinbiss, Gordon Gremme, Christin Sch\"arfer, Malte Mader\\ and Stefan Kurtz} | |
35 | ||
36 | +\date{11/07/2012} | |
37 | \begin{document} | |
38 | ||
39 | \maketitle | |
40 | --- a/doc/manuals/genomediff.tex | |
41 | +++ b/doc/manuals/genomediff.tex | |
42 | @@ -59,6 +59,7 @@ | |
43 | \url{willrodt@zbh.uni-hamburg.de}\\ | |
44 | \end{tabular}} | |
45 | ||
46 | +\date{02/10/2012} | |
47 | \begin{document} | |
48 | %\tsuhhfamily | |
49 | \maketitle | |
50 | --- a/doc/manuals/hop.tex | |
51 | +++ b/doc/manuals/hop.tex | |
52 | @@ -32,6 +32,7 @@ | |
53 | \url{kurtz@zbh.uni-hamburg.de}\\[1cm] | |
54 | \end{tabular}} | |
55 | ||
56 | +\date{15/05/2014} | |
57 | \begin{document} | |
58 | \maketitle | |
59 | ||
60 | --- a/doc/manuals/ltrdigest.tex | |
61 | +++ b/doc/manuals/ltrdigest.tex | |
62 | @@ -41,6 +41,7 @@ | |
63 | \end{tabular} | |
64 | \end{tabular}} | |
65 | ||
66 | +\date{26/08/2013} | |
67 | \begin{document} | |
68 | \maketitle | |
69 | ||
70 | --- a/doc/manuals/ltrharvest.tex | |
71 | +++ b/doc/manuals/ltrharvest.tex | |
72 | @@ -41,6 +41,7 @@ | |
73 | \url{http://www.biomedcentral.com/1471-2105/9/18} | |
74 | \end{tabular} | |
75 | \end{tabular}} | |
76 | +\date{26/08/2013} | |
77 | \begin{document} | |
78 | \maketitle | |
79 | ||
80 | --- a/doc/manuals/mgth.tex | |
81 | +++ b/doc/manuals/mgth.tex | |
82 | @@ -37,6 +37,7 @@ | |
83 | 20146 Hamburg\\ | |
84 | Germany\\[1cm] | |
85 | \end{tabular}} | |
86 | +\date{26/08/2013} | |
87 | \begin{document} | |
88 | \maketitle | |
89 | ||
90 | --- a/doc/manuals/packedindex.tex | |
91 | +++ b/doc/manuals/packedindex.tex | |
92 | @@ -38,6 +38,7 @@ | |
93 | % BMC Bioinformatics 2008, 9:18 | |
94 | \end{tabular} | |
95 | \end{tabular}} | |
96 | +\date{26/08/2013} | |
97 | \begin{document} | |
98 | \maketitle | |
99 | ||
100 | --- a/doc/manuals/readjoiner.tex | |
101 | +++ b/doc/manuals/readjoiner.tex | |
102 | @@ -45,6 +45,7 @@ | |
103 | \url{kurtz@zbh.uni-hamburg.de}\\[1cm] | |
104 | \end{tabular}} | |
105 | ||
106 | +\date{18/02/2014} | |
107 | \begin{document} | |
108 | \maketitle | |
109 | ||
110 | --- a/doc/manuals/repfind.tex | |
111 | +++ b/doc/manuals/repfind.tex | |
112 | @@ -28,6 +28,7 @@ | |
113 | University of Hamburg | |
114 | \end{tabular}} | |
115 | ||
116 | +\date{26/08/2013} | |
117 | \begin{document} | |
118 | \maketitle | |
119 | This manual describes the options of the program \Repfind. It also gives | |
120 | --- a/doc/manuals/tagerator.tex | |
121 | +++ b/doc/manuals/tagerator.tex | |
122 | @@ -22,6 +22,7 @@ | |
123 | University of Hamburg | |
124 | \end{tabular}} | |
125 | ||
126 | +\date{26/08/2013} | |
127 | \begin{document} | |
128 | \maketitle | |
129 | ||
130 | --- a/doc/manuals/tallymer.tex | |
131 | +++ b/doc/manuals/tallymer.tex | |
132 | @@ -95,6 +95,7 @@ | |
133 | University of Hamburg | |
134 | \end{tabular}} | |
135 | ||
136 | +\date{26/08/2013} | |
137 | \begin{document} | |
138 | \maketitle | |
139 | This manual describes the \textit{Tallymer}-software, a collection of programs | |
140 | --- a/doc/manuals/uniquesub.tex | |
141 | +++ b/doc/manuals/uniquesub.tex | |
142 | @@ -24,6 +24,7 @@ | |
143 | University of Hamburg | |
144 | \end{tabular}} | |
145 | ||
146 | +\date{26/08/2013} | |
147 | \begin{document} | |
148 | \maketitle | |
149 | ||
150 | --- a/doc/devguide/devguide.tex | |
151 | +++ b/doc/devguide/devguide.tex | |
152 | @@ -36,6 +36,7 @@ | |
153 | \author{Sascha Steinbiss, Gordon Gremme and Stefan | |
154 | Kurtz\thanks{please send comments to: | |
155 | \texttt{steinbiss@zbh.uni-hamburg.de}}} | |
156 | +\date{18/02/2016} | |
157 | ||
158 | ||
159 | \begin{document} | |
160 | --- a/doc/manuals/matstat.tex | |
161 | +++ b/doc/manuals/matstat.tex | |
162 | @@ -23,6 +23,7 @@ | |
163 | Center for Bioinformatics,\\ | |
164 | University of Hamburg | |
165 | \end{tabular}} | |
166 | +\date{26/01/2008} | |
167 | ||
168 | \begin{document} | |
169 | \maketitle |
0 | Description: Fix compilation on mips64. | |
1 | Author: Sascha Steinbiss <steinbiss@zbh.uni-hamburg.de> | |
2 | --- a/Makefile | |
3 | +++ b/Makefile | |
4 | @@ -308,12 +308,10 @@ | |
5 | endif | |
6 | ||
7 | ifeq ($(m64),yes) | |
8 | - ifneq ($(MACHINE),ia64) | |
9 | - ifneq ($(MACHINE),alpha) | |
10 | - GT_CFLAGS += -m64 | |
11 | - GT_LDFLAGS += -m64 | |
12 | - SQLITE_CFLAGS += -m64 | |
13 | - endif | |
14 | + ifeq (,$(filter $(MACHINE),ia64 alpha mips64 mips64el)) | |
15 | + GT_CFLAGS += -m64 | |
16 | + GT_LDFLAGS += -m64 | |
17 | + SQLITE_CFLAGS += -m64 | |
18 | endif | |
19 | endif | |
20 |
0 | Description: Sort inputs | |
1 | --- a/Makefile | |
2 | +++ b/Makefile | |
3 | @@ -115,7 +115,7 @@ | |
4 | EXAMPLES_SRC:=src/example.c | |
5 | EXAMPLES_DEP:=$(EXAMPLES_SRC:%.c=obj/%.d) | |
6 | ||
7 | -TOOLS_SRC:=$(wildcard src/tools/*.c) | |
8 | +TOOLS_SRC:=$(sort $(wildcard src/tools/*.c)) | |
9 | TOOLS_OBJ:=$(TOOLS_SRC:%.c=obj/%.o) | |
10 | TOOLS_DEP:=$(TOOLS_SRC:%.c=obj/%.d) | |
11 | ||
12 | @@ -449,7 +449,7 @@ | |
13 | endif | |
14 | ||
15 | # the GenomeTools library | |
16 | -LIBGENOMETOOLS_PRESRC:=$(foreach DIR,$(LIBGENOMETOOLS_DIRS),$(wildcard $(DIR)/*.c)) | |
17 | +LIBGENOMETOOLS_PRESRC:=$(foreach DIR,$(LIBGENOMETOOLS_DIRS),$(sort $(wildcard $(DIR)/*.c))) | |
18 | # remove AnnotationSketch-only bindings | |
19 | LIBGENOMETOOLS_PRESRC:=$(filter-out $(CAIRO_FILTER_OUT),\ | |
20 | $(LIBGENOMETOOLS_PRESRC)) | |
21 | @@ -664,7 +664,7 @@ | |
22 | @test -d $(@D) || mkdir -p $(@D) | |
23 | @$(CC) $(EXP_LDFLAGS) $(GT_LDFLAGS) $^ -lm $(LUA_LDLIB) -o $@ | |
24 | ||
25 | -API_HEADERS=$(foreach DIR,$(LIBGENOMETOOLS_DIRS),$(wildcard $(DIR)/*_api.h)) | |
26 | +API_HEADERS=$(foreach DIR,$(LIBGENOMETOOLS_DIRS),$(sort $(wildcard $(DIR)/*_api.h))) | |
27 | ||
28 | obj/public_symbols.lst: $(API_HEADERS) $(LIBGENOMETOOLS_SRC) | |
29 | @echo '[gathering public API symbols to $@]' | |
30 | @@ -999,8 +999,8 @@ | |
31 | ABTOOLS=${shell grep -l Blaufelder src/tools/*.c} | |
32 | ||
33 | ALLSPLINT=${addprefix obj/,${notdir ${subst .c,.splint,\ | |
34 | - ${filter-out ${EISFILES},${wildcard ${CURDIR}/src/match/*.c}}\ | |
35 | - ${wildcard ${CURDIR}/src/ltr/*.c}\ | |
36 | + ${filter-out ${EISFILES},${sort ${wildcard ${CURDIR}/src/match/*.c}}}\ | |
37 | + ${sort ${wildcard ${CURDIR}/src/ltr/*.c}}\ | |
38 | ${SKTOOLS} ${SKCORE} ${SKEXT} \ | |
39 | ${DWTOOLS} ${DWCORE} ${DWEXT} \ | |
40 | ${GGTOOLS} ${GGCORE} ${GGEXT} \ | |
41 | --- a/gtscripts/gtdoc.lua | |
42 | +++ b/gtscripts/gtdoc.lua | |
43 | @@ -104,6 +104,25 @@ | |
44 | end | |
45 | end | |
46 | ||
47 | +local function iter (a, i) -- taken from PiL, page 59 | |
48 | + i = i + 1 | |
49 | + local v = a[i] | |
50 | + if v then | |
51 | + return i, v | |
52 | + end | |
53 | +end | |
54 | + | |
55 | +function sorted_dir(dir) | |
56 | + local entries = {} | |
57 | + local i = 0 | |
58 | + for name in lfs.dir(dir) do | |
59 | + i = i + 1 | |
60 | + entries[i] = name | |
61 | + end | |
62 | + table.sort(entries) | |
63 | + return iter, entries, 0 | |
64 | +end | |
65 | + | |
66 | local export = nil | |
67 | local is_lua = nil | |
68 | ||
69 | @@ -127,7 +146,7 @@ | |
70 | for _, v in ipairs(export) do | |
71 | local filename = gt_home .. "/" .. v | |
72 | if is_dir(filename) then | |
73 | - for f in lfs.dir(filename) do | |
74 | + for _, f in sorted_dir(filename) do | |
75 | local filename = filename .. "/" .. f | |
76 | process_file(filename, be_verbose, is_lua) | |
77 | end |
0 | Description: fix spelling issues | |
1 | Author: Sascha Steinbiss <satta@debian.org> | |
2 | Forwarded: https://github.com/genometools/genometools/pull/727, https://github.com/genometools/genometools/pull/762, https://github.com/genometools/genometools/pull/767 | |
3 | Applied-Upstream: 1.5.9, commit:f47cc4a6e13d037d6342b0213a5739031ada59c1 | |
4 | Last-Update: 2016-03-15 |
0 | Description: fix minor spelling issues | |
1 | Author: Sascha Steinbiss <satta@debian.org> | |
2 | --- a/src/extended/condenseq_creator.c | |
3 | +++ b/src/extended/condenseq_creator.c | |
4 | @@ -1723,7 +1723,7 @@ | |
5 | if (!had_err) { | |
6 | if (gt_showtime_enabled()) | |
7 | gt_timer_show_progress(timer, "write data, alphabet", stderr); | |
8 | - gt_log_log(GT_WU " kmer positons in final kmer_db", | |
9 | + gt_log_log(GT_WU " kmer positions in final kmer_db", | |
10 | gt_kmer_database_get_kmer_count(condenseq_creator->kmer_db)); | |
11 | gt_log_log(GT_WU " xdrop calls.", ces_c_xdrops); | |
12 | gt_log_log(GT_WU " uniques", condenseq_creator->ces->udb_nelems); | |
13 | --- a/src/extended/intset.h | |
14 | +++ b/src/extended/intset.h | |
15 | @@ -74,7 +74,7 @@ | |
16 | size_t gt_intset_best_memory_size(GtUword maxelement, GtUword num_of_elems); | |
17 | ||
18 | /* Write <intset> to file <fp>. Fails with exit on IO-error. Returns NULL if | |
19 | - data error occures and writes it to <err>, <intset> will be deleted at that | |
20 | + data error occurs and writes it to <err>, <intset> will be deleted at that | |
21 | point. */ | |
22 | GtIntset* gt_intset_write(GtIntset *intset, FILE *fp, GtError *err); | |
23 | ||
24 | --- a/src/extended/wtree_encseq.c | |
25 | +++ b/src/extended/wtree_encseq.c | |
26 | @@ -84,7 +84,7 @@ | |
27 | ||
28 | if (bit == 0) { | |
29 | pos = gt_compressed_bitsequence_rank_0(we->c_bits, node_start + pos) - | |
30 | - zero_rank_prefix - 1; /*convert count (rank) to positon */ | |
31 | + zero_rank_prefix - 1; /*convert count (rank) to position */ | |
32 | alpha_end = middle; | |
33 | node_start += we->parent_instance.members->length; | |
34 | node_size = left_child_size; | |
35 | @@ -96,7 +96,7 @@ | |
36 | one_rank_prefix = | |
37 | gt_compressed_bitsequence_rank_1(we->c_bits, node_start - 1); | |
38 | pos = gt_compressed_bitsequence_rank_1(we->c_bits, node_start + pos) - | |
39 | - one_rank_prefix - 1; /*convert count (rank) to positon */ | |
40 | + one_rank_prefix - 1; /*convert count (rank) to position */ | |
41 | alpha_start = middle + 1; | |
42 | node_size = | |
43 | gt_compressed_bitsequence_rank_1(we->c_bits, | |
44 | --- a/src/match/seqabstract.h | |
45 | +++ b/src/match/seqabstract.h | |
46 | @@ -71,7 +71,7 @@ | |
47 | /* return the length of <sa> */ | |
48 | GtUword gt_seqabstract_length(const GtSeqabstract *sa); | |
49 | ||
50 | -/* return character at positon <idx> (relative to <startpos>) of <sa> */ | |
51 | +/* return character at position <idx> (relative to <startpos>) of <sa> */ | |
52 | GtUchar gt_seqabstract_encoded_char(const GtSeqabstract *sa, | |
53 | GtUword idx); | |
54 | ||
55 | --- a/src/match/sfx-diffcov.c | |
56 | +++ b/src/match/sfx-diffcov.c | |
57 | @@ -491,7 +491,7 @@ | |
58 | return countderived; | |
59 | } | |
60 | ||
61 | -static int dc_compareCodeatpositon(const void *vala,const void *valb) | |
62 | +static int dc_compareCodeatposition(const void *vala,const void *valb) | |
63 | { | |
64 | const Codeatposition *a = (const Codeatposition *) vala; | |
65 | const Codeatposition *b = (const Codeatposition *) valb; | |
66 | @@ -516,7 +516,7 @@ | |
67 | return 0; | |
68 | } | |
69 | ||
70 | -static void dc_validate_samplepositons(const GtDifferencecover *dcov) | |
71 | +static void dc_validate_samplepositions(const GtDifferencecover *dcov) | |
72 | { | |
73 | GtUword pos; | |
74 | unsigned int modvalue; | |
75 | @@ -1268,7 +1268,7 @@ | |
76 | gt_assert(codelist.spaceCodeatposition != NULL); | |
77 | qsort(codelist.spaceCodeatposition, | |
78 | (size_t) codelist.nextfreeCodeatposition, | |
79 | - sizeof (*codelist.spaceCodeatposition),dc_compareCodeatpositon); | |
80 | + sizeof (*codelist.spaceCodeatposition),dc_compareCodeatposition); | |
81 | } | |
82 | if (dcov->effectivesamplesize > 0) | |
83 | { | |
84 | @@ -1690,7 +1690,7 @@ | |
85 | printf("v=%u (size=%u)\n",dcov->vparam,dcov->size); | |
86 | if (withcheck) | |
87 | { | |
88 | - dc_validate_samplepositons(dcov); | |
89 | + dc_validate_samplepositions(dcov); | |
90 | } | |
91 | dc_differencecover_sortsample(dcov,NULL,NULL,NULL,withcheck); | |
92 | gt_differencecover_delete(dcov); | |
93 | --- a/src/tools/gt_kmer_database.c | |
94 | +++ b/src/tools/gt_kmer_database.c | |
95 | @@ -126,8 +126,8 @@ | |
96 | gt_option_exclude(option_mean_cutoff, option); | |
97 | ||
98 | /* -disable_prune */ | |
99 | - option = gt_option_new_bool("disable_prune", "disables the removel of kmers, " | |
100 | - "which occure more often than the cutoff.", | |
101 | + option = gt_option_new_bool("disable_prune", "disables the removal of kmers " | |
102 | + "which occur more often than the cutoff.", | |
103 | &arguments->prune, false); | |
104 | gt_option_parser_add_option(op, option); | |
105 | gt_option_imply(option, option_use_cutoff); | |
106 | --- a/src/tools/gt_show_seedext.c | |
107 | +++ b/src/tools/gt_show_seedext.c | |
108 | @@ -119,7 +119,7 @@ | |
109 | ||
110 | /* -sort */ | |
111 | op_sortmatches = gt_option_new_bool("sort","sort matches in ascending order " | |
112 | - "of their end positon on the " | |
113 | + "of their end position on the " | |
114 | "query", | |
115 | &arguments->sortmatches,false); | |
116 | gt_option_parser_add_option(op, op_sortmatches); |
0 | --- a/Makefile | |
1 | +++ b/Makefile | |
2 | @@ -894,8 +894,13 @@ | |
3 | $(RANLIB) $(prefix)/lib/libgenometools.a | |
4 | endif | |
5 | ifneq ($(sharedlib),no) | |
6 | - cp lib/libgenometools$(SHARED_OBJ_NAME_EXT)$(SONAME_VERSION) $(prefix)/lib | |
7 | + find src -name '*_api.h' | xargs egrep -ho '(gt_[0-9a-zA-Z_]+)(\[|\()' \ | |
8 | + | sort | uniq | sed s'/.$$//' > apisyms | |
9 | + objcopy --strip-all --keep-symbols apisyms \ | |
10 | + lib/libgenometools$(SHARED_OBJ_NAME_EXT)$(SONAME_VERSION) \ | |
11 | + $(prefix)/lib/libgenometools$(SHARED_OBJ_NAME_EXT)$(SONAME_VERSION) | |
12 | ln -fs $(prefix)/lib/libgenometools$(SHARED_OBJ_NAME_EXT)$(SONAME_VERSION) $(prefix)/lib/libgenometools$(SHARED_OBJ_NAME_EXT) | |
13 | + rm apisyms | |
14 | endif | |
15 | @echo '[build config script $(@F)]' | |
16 | sed -e 's!@CC@!$(CC)!' -e 's!@CFLAGS@!$(EXP_CFLAGS)!' \ |
0 | Description: Type conversion problem fixes. | |
1 | Author: Sascha Steinbiss <steinbiss@zbh.uni-hamburg.de> | |
2 | --- a/src/gtlua/encseq_lua.c | |
3 | +++ b/src/gtlua/encseq_lua.c | |
4 | @@ -80,8 +80,10 @@ | |
5 | GtReadmode readmode; | |
6 | reader = check_encseq_reader(L, 1); | |
7 | encseq = check_encseq(L, 2); | |
8 | - readmode = luaL_checknumber(L, 3); | |
9 | - startpos = luaL_checknumber(L, 4); | |
10 | + readmode = luaL_checklong(L, 3); | |
11 | + startpos = luaL_checklong(L, 4); | |
12 | + luaL_argcheck(L, readmode <= 3, 3, | |
13 | + "invalid readmode value, must be <= 3"); | |
14 | luaL_argcheck(L, startpos < gt_encseq_total_length(*encseq), 4, | |
15 | "cannot exceed total length of encoded sequence"); | |
16 | gt_encseq_reader_reinit_with_readmode(*reader, *encseq, readmode, startpos); | |
17 | @@ -113,10 +115,12 @@ | |
18 | int readmode; | |
19 | unsigned char cc; | |
20 | encseq = check_encseq(L, 1); | |
21 | - pos = luaL_checknumber(L, 2); | |
22 | - readmode = luaL_checknumber(L, 3); | |
23 | + pos = luaL_checklong(L, 2); | |
24 | + readmode = luaL_checklong(L, 3); | |
25 | luaL_argcheck(L, pos < gt_encseq_total_length(*encseq), 2, | |
26 | "cannot exceed total length of encoded sequence"); | |
27 | + luaL_argcheck(L, readmode <= 3, 3, | |
28 | + "invalid readmode value, must be <= 3"); | |
29 | cc = gt_encseq_get_encoded_char(*encseq, pos, readmode); | |
30 | lua_pushnumber(L, cc); | |
31 | return 1; | |
32 | @@ -129,10 +133,12 @@ | |
33 | int readmode; | |
34 | char cc; | |
35 | encseq = check_encseq(L, 1); | |
36 | - pos = luaL_checknumber(L, 2); | |
37 | - readmode = luaL_checknumber(L, 3); | |
38 | + pos = luaL_checklong(L, 2); | |
39 | + readmode = luaL_checklong(L, 3); | |
40 | luaL_argcheck(L, pos < gt_encseq_total_length(*encseq), 2, | |
41 | "cannot exceed total length of encoded sequence"); | |
42 | + luaL_argcheck(L, readmode <= 3, 3, | |
43 | + "invalid readmode value, must be <= 3"); | |
44 | cc = gt_encseq_get_decoded_char(*encseq, pos, readmode); | |
45 | lua_pushlstring(L, &cc, sizeof (char)); | |
46 | return 1; | |
47 | @@ -192,8 +198,8 @@ | |
48 | GtUword from, to; | |
49 | unsigned char *string; | |
50 | encseq = check_encseq(L, 1); | |
51 | - from = luaL_checknumber(L, 2); | |
52 | - to = luaL_checknumber(L, 3); | |
53 | + from = luaL_checklong(L, 2); | |
54 | + to = luaL_checklong(L, 3); | |
55 | luaL_argcheck(L, from <= to, 2, "must be <= range endposition"); | |
56 | luaL_argcheck(L, to < gt_encseq_total_length(*encseq), 3, | |
57 | "cannot exceed total length of encoded sequence"); | |
58 | @@ -209,8 +215,8 @@ | |
59 | GtUword from, to; | |
60 | char *string; | |
61 | encseq = check_encseq(L, 1); | |
62 | - from = luaL_checknumber(L, 2); | |
63 | - to = luaL_checknumber(L, 3); | |
64 | + from = luaL_checklong(L, 2); | |
65 | + to = luaL_checklong(L, 3); | |
66 | luaL_argcheck(L, from <= to, 2, "must be <= range endposition"); | |
67 | luaL_argcheck(L, to < gt_encseq_total_length(*encseq), 3, | |
68 | "cannot exceed total length of encoded sequence"); | |
69 | @@ -226,7 +232,7 @@ | |
70 | GtEncseq **encseq; | |
71 | GtUword pos; | |
72 | encseq = check_encseq(L, 1); | |
73 | - pos = luaL_checknumber(L, 2); | |
74 | + pos = luaL_checklong(L, 2); | |
75 | luaL_argcheck(L, pos < gt_encseq_num_of_sequences(*encseq), 2, | |
76 | "cannot exceed number of sequences"); | |
77 | lua_pushnumber(L, gt_encseq_seqlength(*encseq, pos)); | |
78 | @@ -238,7 +244,7 @@ | |
79 | GtEncseq **encseq; | |
80 | GtUword pos; | |
81 | encseq = check_encseq(L, 1); | |
82 | - pos = luaL_checknumber(L, 2); | |
83 | + pos = luaL_checklong(L, 2); | |
84 | luaL_argcheck(L, pos < gt_encseq_num_of_sequences(*encseq), 2, | |
85 | "cannot exceed number of sequences"); | |
86 | lua_pushnumber(L, gt_encseq_seqstartpos(*encseq, pos)); | |
87 | @@ -250,7 +256,7 @@ | |
88 | GtEncseq **encseq; | |
89 | GtUword pos; | |
90 | encseq = check_encseq(L, 1); | |
91 | - pos = luaL_checknumber(L, 2); | |
92 | + pos = luaL_checklong(L, 2); | |
93 | luaL_argcheck(L, pos < gt_encseq_total_length(*encseq), 2, | |
94 | "cannot exceed total length of encoded sequence"); | |
95 | lua_pushnumber(L, gt_encseq_seqnum(*encseq, pos)); | |
96 | @@ -279,7 +285,7 @@ | |
97 | GtUword seqno, desclen; | |
98 | const char *string; | |
99 | encseq = check_encseq(L, 1); | |
100 | - seqno = luaL_checknumber(L, 2); | |
101 | + seqno = luaL_checklong(L, 2); | |
102 | luaL_argcheck(L, seqno < gt_encseq_num_of_sequences(*encseq), 2, | |
103 | "cannot exceed number of sequences"); | |
104 | string = gt_encseq_description(*encseq, &desclen, seqno); | |
105 | @@ -300,7 +306,7 @@ | |
106 | GtEncseq **encseq; | |
107 | GtUword fileno; | |
108 | encseq = check_encseq(L, 1); | |
109 | - fileno = luaL_checknumber(L, 2); | |
110 | + fileno = luaL_checklong(L, 2); | |
111 | luaL_argcheck(L, fileno < gt_encseq_num_of_files(*encseq), 2, | |
112 | "cannot exceed number of files"); | |
113 | lua_pushnumber(L, gt_encseq_effective_filelength(*encseq, fileno)); | |
114 | @@ -312,7 +318,7 @@ | |
115 | GtEncseq **encseq; | |
116 | GtUword fileno; | |
117 | encseq = check_encseq(L, 1); | |
118 | - fileno = luaL_checknumber(L, 2); | |
119 | + fileno = luaL_checklong(L, 2); | |
120 | luaL_argcheck(L, fileno < gt_encseq_num_of_files(*encseq), 2, | |
121 | "cannot exceed number of files"); | |
122 | lua_pushnumber(L, gt_encseq_filestartpos(*encseq, fileno)); | |
123 | @@ -324,7 +330,7 @@ | |
124 | GtEncseq **encseq; | |
125 | GtUword pos; | |
126 | encseq = check_encseq(L, 1); | |
127 | - pos = luaL_checknumber(L, 2); | |
128 | + pos = luaL_checklong(L, 2); | |
129 | luaL_argcheck(L, pos < gt_encseq_total_length(*encseq), 2, | |
130 | "cannot exceed total length of encoded sequence"); | |
131 | lua_pushnumber(L, gt_encseq_filenum(*encseq, pos)); | |
132 | @@ -397,8 +403,10 @@ | |
133 | GtUword startpos; | |
134 | GtReadmode readmode; | |
135 | encseq = check_encseq(L, 1); | |
136 | - readmode = luaL_checknumber(L, 2); | |
137 | - startpos = luaL_checknumber(L, 3); | |
138 | + readmode = luaL_checklong(L, 2); | |
139 | + startpos = luaL_checklong(L, 3); | |
140 | + luaL_argcheck(L, readmode <= 3, 2, | |
141 | + "invalid readmode value, must be <= 3"); | |
142 | luaL_argcheck(L, startpos < gt_encseq_total_length(*encseq), 3, | |
143 | "cannot exceed total length of encoded sequence"); | |
144 | reader = gt_encseq_create_reader_with_readmode(*encseq, readmode, startpos); | |
145 | --- a/src/gtlua/mathsupport_lua.c | |
146 | +++ b/src/gtlua/mathsupport_lua.c | |
147 | @@ -21,7 +21,7 @@ | |
148 | ||
149 | static int gt_lua_mathsupport_rand_max(lua_State *L) | |
150 | { | |
151 | - GtUword max = luaL_checknumber(L, 1); | |
152 | + GtUword max = luaL_checklong(L, 1); | |
153 | ||
154 | lua_pushnumber(L, gt_rand_max(max)); | |
155 | return 1; | |
156 | --- a/src/match/eis-bwtseq.c | |
157 | +++ b/src/match/eis-bwtseq.c | |
158 | @@ -473,7 +473,7 @@ | |
159 | CONTEXT_INTERVAL = 128, | |
160 | }; | |
161 | ||
162 | -int | |
163 | +enum verifyBWTSeqErrCode | |
164 | gt_BWTSeqVerifyIntegrity(BWTSeq *bwtSeq, const char *projectName, | |
165 | int checkFlags, | |
166 | GtUword tickPrint, FILE *fp, | |
167 | --- a/src/tools/gt_tir.c | |
168 | +++ b/src/tools/gt_tir.c | |
169 | @@ -394,9 +394,9 @@ | |
170 | GtNodeVisitor *pdom_v; | |
171 | ms = gt_pdom_model_set_new(arguments->hmm_files, err); | |
172 | if (ms != NULL) { | |
173 | - pdom_v = gt_ltrdigest_pdom_visitor_new(ms, arguments->cutoff, | |
174 | + pdom_v = gt_ltrdigest_pdom_visitor_new(ms, arguments->evalue_cutoff, | |
175 | arguments->chain_max_gap_length, | |
176 | - arguments->evalue_cutoff, rmap, | |
177 | + arguments->cutoff, rmap, | |
178 | err); | |
179 | if (pdom_v == NULL) | |
180 | had_err = -1; | |
181 | --- a/testdata/gtscripts/encseq.lua | |
182 | +++ b/testdata/gtscripts/encseq.lua | |
183 | @@ -60,6 +60,9 @@ | |
184 | rval, err = pcall(GenomeTools_encseq.get_encoded_char, es, 100, 0) | |
185 | assert(not rval) | |
186 | assert(string.find(err, "cannot exceed")) | |
187 | + rval, err = pcall(GenomeTools_encseq.get_encoded_char, es, 10, 6) | |
188 | + assert(not rval) | |
189 | + assert(string.find(err, "invalid readmode")) | |
190 | end | |
191 | ||
192 | function run_test_seq_startpos(es) | |
193 | @@ -99,6 +102,9 @@ | |
194 | rval, err = pcall(GenomeTools_encseq.seqlength, es, 2) | |
195 | assert(not rval) | |
196 | assert(string.find(err, "cannot exceed")) | |
197 | + rval, err = pcall(GenomeTools_encseq.get_encoded_char, es, 10, 6) | |
198 | + assert(not rval) | |
199 | + assert(string.find(err, "invalid readmode")) | |
200 | end | |
201 | ||
202 | function run_test_file_length_protein(es) | |
203 | @@ -128,7 +134,7 @@ | |
204 | rval, err = pcall(GenomeTools_encseq.extract_encoded, es, 300, 500) | |
205 | assert(not rval) | |
206 | assert(string.find(err, "cannot exceed")) | |
207 | - | |
208 | + | |
209 | end | |
210 | ||
211 | function run_test_seq_substr_decoded(es, seq1, seq2) | |
212 | @@ -168,7 +174,10 @@ | |
213 | rval, err = pcall(GenomeTools_encseq.create_reader_with_readmode, es, 0, 300) | |
214 | assert(not rval) | |
215 | assert(string.find(err, "cannot exceed")) | |
216 | -end | |
217 | + rval, err = pcall(GenomeTools_encseq.create_reader_with_readmode, es, 7, 3) | |
218 | + assert(not rval) | |
219 | + assert(string.find(err, "invalid readmode")) | |
220 | +end | |
221 | ||
222 | ee = gt.encseq_encoder_new() | |
223 | ee:encode({dnaseqfile}, "dnaseqfile") |
0 | From afaed82084071e9d11663b7ce593fa83e6eabbe5 Mon Sep 17 00:00:00 2001 | |
1 | From: Justus Winter <justus@gnupg.org> | |
2 | Date: Fri, 19 Feb 2016 14:06:41 +0100 | |
3 | Subject: [PATCH 1/6] Makefile: Drop spurious '$(3)' | |
4 | ||
5 | * Makefile: Drop spurious '$(3)', likely a left-over from copying | |
6 | 'COMPILE_template'. | |
7 | --- | |
8 | Makefile | 4 ++-- | |
9 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
10 | ||
11 | --- /dev/null | |
12 | +++ b/src/external/lpeg-0.10.2/lua-lpeg.h | |
13 | @@ -0,0 +1,39 @@ | |
14 | +/* | |
15 | +** $Id: lpeg.h,v 1.1 2009/12/23 16:15:36 roberto Exp $ | |
16 | +** LPeg - PEG pattern matching for Lua | |
17 | +** Copyright 2009, Lua.org & PUC-Rio (see 'lpeg.html' for license) | |
18 | +** written by Roberto Ierusalimschy | |
19 | +*/ | |
20 | + | |
21 | +#ifndef lpeg_h | |
22 | +#define lpeg_h | |
23 | + | |
24 | +#include "lua.h" | |
25 | + | |
26 | +int luaopen_lpeg (lua_State *L); | |
27 | + | |
28 | +#define KEYNEWPATT "lpeg.newpf" | |
29 | + | |
30 | + | |
31 | +/* | |
32 | +** type of extension functions that define new "patterns" for LPEG | |
33 | +** It should return the new current position or NULL if match fails | |
34 | +*/ | |
35 | +typedef const char *(*PattFunc) (const char *s, /* current position */ | |
36 | + const char *e, /* string end */ | |
37 | + const char *o, /* string start */ | |
38 | + const void *ud); /* user data */ | |
39 | + | |
40 | +/* | |
41 | +** function to create new patterns based on 'PattFunc' functions. | |
42 | +** This function is available at *registry[KEYNEWPATT]. (Notice | |
43 | +** the extra indirection; the userdata at the registry points to | |
44 | +** a variable that points to the function. In ANSI C a void* cannot | |
45 | +** point to a function.) | |
46 | +*/ | |
47 | +typedef void (*Newpf) (lua_State *L, | |
48 | + PattFunc f, /* pattern */ | |
49 | + const void *ud, /* (user) data to be passed to 'f' */ | |
50 | + size_t l); /* size of data to be passed to 'f' */ | |
51 | + | |
52 | +#endif |