Permalink
Browse files

fix API problem

  • Loading branch information...
1 parent 2aff49b commit d16b52534b50c37fa27e93ff2fdbd2522bc962aa @gordon committed Apr 12, 2012
View
@@ -1,4 +1,4 @@
-changes in version 1.4.1 (2012-04-11)
+changes in version 1.4.1 (2012-04-12)
- the GFF3 parser now handles children which are defined before their parents
- many small improvements to the GFF3 parser
@@ -17,6 +17,7 @@
<li><a id="current" href="libgenometools.html">C API</a></li>
<li><a href="docs.html"><tt>gtscript</tt> docs</a></li>
<li><a href="annotationsketch.html"><tt>AnnotationSketch</tt></a></li>
+<li><a href="/cgi-bin/gff3validator.cgi">GFF3 validator</a></li>
<li><a href="license.html">License</a></li>
</ul>
</div>
@@ -36,9 +36,7 @@ struct GtGFF3InStreamPlain {
stdin_argument,
stdin_processed,
file_is_open,
- progress_bar,
- checkids,
- checkregions;
+ progress_bar;
GtFile *fpin;
unsigned long long line_number;
GtQueue *genome_node_buffer;
@@ -237,22 +235,19 @@ static GtNodeStream* gff3_in_stream_plain_new(GtStrArray *files,
void gt_gff3_in_stream_plain_check_id_attributes(GtGFF3InStreamPlain *is)
{
gt_assert(is);
- is->checkids = true;
gt_gff3_parser_check_id_attributes(is->gff3_parser);
}
void gt_gff3_in_stream_plain_check_region_boundaries(GtGFF3InStreamPlain *is)
{
gt_assert(is);
- is->checkregions = true;
gt_gff3_parser_check_region_boundaries(is->gff3_parser);
}
-void gt_gff3_in_stream_plain_do_not_check_region_boundaries(
- GtGFF3InStreamPlain *is)
+void gt_gff3_in_stream_plain_do_not_check_region_boundaries(GtGFF3InStreamPlain
+ *is)
{
gt_assert(is);
- is->checkregions = true;
gt_gff3_parser_do_not_check_region_boundaries(is->gff3_parser);
}
@@ -268,9 +263,7 @@ void gt_gff3_in_stream_plain_set_type_checker(GtNodeStream *ns,
GtGFF3InStreamPlain *is = gff3_in_stream_plain_cast(ns);
gt_assert(is);
gt_gff3_parser_delete(is->gff3_parser);
- is->gff3_parser = gt_gff3_parser_new(type_checker);
- if (is->checkids)
- gt_gff3_parser_check_id_attributes(is->gff3_parser);
+ gt_gff3_parser_set_type_checker(is->gff3_parser, type_checker);
}
GtStrArray* gt_gff3_in_stream_plain_get_used_types(GtNodeStream *ns)
@@ -128,6 +128,14 @@ void gt_gff3_parser_set_offset(GtGFF3Parser *parser, long offset)
parser->offset = offset;
}
+void gt_gff3_parser_set_type_checker(GtGFF3Parser *parser,
+ GtTypeChecker *type_checker)
+{
+ gt_assert(parser && type_checker);
+ gt_type_checker_delete(parser->type_checker);
+ parser->type_checker = gt_type_checker_ref(type_checker);
+}
+
int gt_gff3_parser_set_offsetfile(GtGFF3Parser *parser, GtStr *offsetfile,
GtError *err)
{
@@ -50,6 +50,9 @@ void gt_gff3_parser_do_not_check_region_boundaries(GtGFF3Parser
*gff3_parser);
/* Transform all features parsed by <gff3_parser> by the given <offset>. */
void gt_gff3_parser_set_offset(GtGFF3Parser *gff3_parser, long offset);
+/* Set <type_checker> used by <gff3_parser>. */
+void gt_gff3_parser_set_type_checker(GtGFF3Parser *gff3_parser,
+ GtTypeChecker *type_checker);
/* Enable the tidy mode in <gff3_parser>. In tidy mode the <gff3_parser> parser
tries to tidy up features which would normally lead to a parse error. */
void gt_gff3_parser_enable_tidy_mode(GtGFF3Parser *gff3_parser);
@@ -3427,6 +3427,14 @@
Transform all features parsed by <code>gff3_parser</code> by the given <code>offset</code>.
</p>
<hr>
+<a name="gt_gff3_parser_set_type_checker"></a>
+
+<code>void gt_gff3_parser_set_type_checker(GtGFF3Parser *gff3_parser,
+ GtTypeChecker *type_checker)</code>
+<p>
+Set <code>type_checker</code> used by <code>gff3_parser</code>.
+</p>
+<hr>
<a name="gt_gff3_parser_enable_tidy_mode"></a>
<code>void gt_gff3_parser_enable_tidy_mode(GtGFF3Parser *gff3_parser)</code>
@@ -6851,17 +6859,17 @@
0 if <code>a</code> is <em>equal</em> to <code>b</code>, and greater 0 if <code>a</code> is <em>larger</em> than <code>b</code>.
Thereby, the operators <em>smaller</em>, <em>equal</em>, and <em>larger</em> are
implementation dependent.
- Do not count on these functions to return -1, 0, or 1!
+ Do not count on these functions to return -1, 0, or 1!
</p>
<hr>
<code>int (*GtCompareWithData)(const void*, const void*, void *data)</code>
<p>
- Similar to <code>GtCompare</code>, but with an additional <code>data</code> pointer.
+ Similar to <code>GtCompare</code>, but with an additional <code>data</code> pointer.
</p>
<hr>
<code>void (*GtFree)(void*)</code>
<p>
- The generic free function pointer type.
+ The generic free function pointer type.
</p>
<hr>
<a name="Grep"></a>
@@ -7239,7 +7247,7 @@
<h2>Module Warning</h2>
<code>void (*GtWarningHandler)(void *data, const char *format, va_list ap)</code>
<p>
- Handler type used to process warnings.
+ Handler type used to process warnings.
</p>
<hr>
<a name="gt_warning"></a>
@@ -8219,6 +8227,8 @@
<a href="#gt_gff3_parser_set_offset"><code>gt_gff3_parser_set_offset</code></a><br>
+ <a href="#gt_gff3_parser_set_type_checker"><code>gt_gff3_parser_set_type_checker</code></a><br>
+
<a href="#gt_gff3_visitor_new"><code>gt_gff3_visitor_new</code></a><br>
<a href="#gt_gff3_visitor_retain_id_attributes"><code>gt_gff3_visitor_retain_id_attributes</code></a><br>
@@ -8894,7 +8904,7 @@
<div id="footer">
Copyright &copy; 2008-2011
<a href="mailto:gremme@gmail.com">Gordon Gremme.</a>
-Last update: 2012-04-11
+Last update: 2012-04-12
</div>
</div>
<!-- Piwik -->

0 comments on commit d16b525

Please sign in to comment.