Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
18434d81
Commit
18434d81
authored
20 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
Use new config routine to init config structs.
parent
b36a4d25
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapFeature/zmapFeatureTypes.c
+14
-27
14 additions, 27 deletions
src/zmapFeature/zmapFeatureTypes.c
with
14 additions
and
27 deletions
src/zmapFeature/zmapFeatureTypes.c
+
14
−
27
View file @
18434d81
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See ZMap/zmapFeature.h
* HISTORY:
* Last edited: Feb
1 09:30
2005 (edgrif)
* Last edited: Feb
3 16:45
2005 (edgrif)
* Created: Tue Dec 14 13:15:11 2004 (edgrif)
* CVS info: $Id: zmapFeatureTypes.c,v 1.
1
2005-02-0
2
1
5:08:36
edgrif Exp $
* CVS info: $Id: zmapFeatureTypes.c,v 1.
2
2005-02-0
3
1
6:47:02
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -142,34 +142,21 @@ GData *zMapFeatureTypeGetFromFile(char *types_file_name)
ZMapConfigStanzaSet
types_list
=
NULL
;
ZMapConfig
config
;
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
char
*
types_file_name
=
"ZMapTypes"
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
if
((
config
=
zMapConfigCreateFromFile
(
NULL
,
types_file_name
)))
{
ZMapConfigStanza
types_stanza
;
/* Set up default values for variables in the stanza. Elements here must match
* those being loaded below or you might segfault.
* IF YOU ADD ANY ELEMENTS TO THIS ARRAY THEN MAKE SURE YOU UPDATE THE INIT STATEMENTS
* FOLLOWING THIS ARRAY SO THEY POINT AT THE RIGHT ELEMENTS....!!!!!!!! */
ZMapConfigStanzaElementStruct
types_elements
[]
=
{{
"name"
,
ZMAPCONFIG_STRING
,
{
NULL
}},
{
"outline"
,
ZMAPCONFIG_STRING
,
{
"black"
}},
{
"foreground"
,
ZMAPCONFIG_STRING
,
{
"white"
}},
{
"background"
,
ZMAPCONFIG_STRING
,
{
"black"
}},
{
"width"
,
ZMAPCONFIG_FLOAT
,
{
NULL
}},
{
"showUpStrand"
,
ZMAPCONFIG_BOOL
,
{
NULL
}},
{
"minmag"
,
ZMAPCONFIG_INT
,
{
NULL
}},
{
NULL
,
-
1
,
{
NULL
}}}
;
/* minmag should be a float !!! */
/* Must init separately as compiler cannot statically init different union types....sigh.... */
types_elements
[
4
].
data
.
f
=
ZMAPFEATURE_DEFAULT_WIDTH
;
ZMapConfigStanzaElementStruct
types_elements
[]
=
{{
"name"
,
ZMAPCONFIG_STRING
,
{
NULL
}},
{
"outline"
,
ZMAPCONFIG_STRING
,
{
"black"
}},
{
"foreground"
,
ZMAPCONFIG_STRING
,
{
"white"
}},
{
"background"
,
ZMAPCONFIG_STRING
,
{
"black"
}},
{
"width"
,
ZMAPCONFIG_FLOAT
,
{
NULL
}},
{
"showUpStrand"
,
ZMAPCONFIG_BOOL
,
{
NULL
}},
{
"minmag"
,
ZMAPCONFIG_INT
,
{
NULL
}},
{
NULL
,
-
1
,
{
NULL
}}}
;
/* Init fields that cannot default to string NULL. */
zMapConfigGetStructFloat
(
types_elements
,
"width"
)
=
ZMAPFEATURE_DEFAULT_WIDTH
;
types_stanza
=
zMapConfigMakeStanza
(
"Type"
,
types_elements
)
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment