Skip to content
Snippets Groups Projects
Commit 240ebb15 authored by edgrif's avatar edgrif
Browse files

remove redundant column tag and style parsing code.

parent 213f9056
No related branches found
No related tags found
No related merge requests found
......@@ -26,9 +26,9 @@
*
* Exported functions: See ZMap/zmapGFF.h
* HISTORY:
* Last edited: Apr 8 18:01 2009 (edgrif)
* Last edited: Apr 16 10:06 2009 (edgrif)
* Created: Fri May 28 14:25:12 2004 (edgrif)
* CVS info: $Id: zmapGFF2parser.c,v 1.88 2009-04-08 17:02:26 edgrif Exp $
* CVS info: $Id: zmapGFF2parser.c,v 1.89 2009-04-16 09:06:47 edgrif Exp $
*-------------------------------------------------------------------
*/
......@@ -67,8 +67,6 @@ static gboolean getFeatureName(NameFindType name_find, char *sequence, char *att
ZMapStyleMode feature_type,
ZMapStrand strand, int start, int end, int query_start, int query_end,
char **feature_name, char **feature_name_id) ;
static gboolean getColumnGroup(char *attributes, GQuark *column_group_out) ;
static gboolean getStyle(char *attributes, GQuark *style_out) ;
static char *getURL(char *attributes) ;
static GQuark getClone(char *attributes) ;
static GQuark getLocus(char *attributes) ;
......@@ -1577,78 +1575,6 @@ static gboolean getFeatureName(NameFindType name_find, char *sequence, char *att
}
/* Format of Style attribute section is:
*
* Style "style name" ;
*
* The Style is the ZMap_Style style for this feature, the style will have been
* loaded separately.
*
* */
static gboolean getStyle(char *attributes, GQuark *style_out)
{
gboolean result = FALSE ;
char *tag_pos ;
char *attr_format_str = "%*s %*[\"]%50[^\"]%*[;]" ;
char style_field[GFF_MAX_FIELD_CHARS + 1] = {'\0'} ;
int attr_fields ;
if ((tag_pos = strstr(attributes, "Style")))
{
if ((attr_fields = sscanf(tag_pos, attr_format_str,
&style_field[0])) == 1)
{
result = TRUE ;
}
else
result = FALSE ;
}
if (result)
{
*style_out = g_quark_from_string(&style_field[0]) ;
}
return result ;
}
/* Format of column group attribute section is:
*
* Column_group "column name" ;
*
*
* Column_group is a zmap/acedb special tag to enable placement of features
* with different styles/methods in a single column. The GFF line specifies the
* column the feature should be placed in via the Column_group tag.
*
* */
static gboolean getColumnGroup(char *attributes, GQuark *column_group_out)
{
gboolean result = FALSE ;
char *tag_pos ;
char *attr_format_str = "%*s %*[\"]%50[^\"]%*[;]" ;
char column_field[GFF_MAX_FIELD_CHARS + 1] = {'\0'} ;
int attr_fields ;
if ((tag_pos = strstr(attributes, "Column_parent")))
{
if ((attr_fields = sscanf(tag_pos, attr_format_str,
&column_field[0])) == 1)
{
result = TRUE ;
}
else
result = FALSE ;
}
if (result)
{
*column_group_out = g_quark_from_string(&column_field[0]) ;
}
return result ;
}
/* Format of URL attribute section is:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment