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
81121392
Commit
81121392
authored
15 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
add code to check for start/end separately from sequence.
parent
5791dc0c
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/zmapApp/zmapAppwindow.c
+40
-29
40 additions, 29 deletions
src/zmapApp/zmapAppwindow.c
with
40 additions
and
29 deletions
src/zmapApp/zmapAppwindow.c
+
40
−
29
View file @
81121392
...
...
@@ -26,9 +26,9 @@
*
* Exported functions: None
* HISTORY:
* Last edited:
Aug 14 10:25
2009 (edgrif)
* Last edited:
Nov 16 13:10
2009 (edgrif)
* Created: Thu Jul 24 14:36:27 2003 (edgrif)
* CVS info: $Id: zmapAppwindow.c,v 1.6
1
2009-
08-14 09:53:09
edgrif Exp $
* CVS info: $Id: zmapAppwindow.c,v 1.6
2
2009-
11-18 16:00:22
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -51,8 +51,8 @@
#define CLEAN_EXIT_MSG "Exit clean - goodbye cruel world !"
static
void
checkForCmdLineVersionArg
(
int
argc
,
char
*
argv
[])
;
static
void
checkForCmdLineSequenceArg
s
(
int
argc
,
char
*
argv
[],
char
**
sequence_out
,
int
*
start_out
,
int
*
end_out
)
;
static
void
checkForCmdLineSequenceArg
(
int
argc
,
char
*
argv
[],
char
**
sequence_out
)
;
static
void
checkForCmdLineStartEndArg
(
int
argc
,
char
*
argv
[]
,
int
*
start_
in
out
,
int
*
end_
in
out
)
;
static
void
checkConfigDir
(
void
)
;
static
gboolean
removeZMapRowForeachFunc
(
GtkTreeModel
*
model
,
GtkTreePath
*
path
,
GtkTreeIter
*
iter
,
gpointer
data
);
...
...
@@ -240,14 +240,18 @@ int zmapMainMakeAppWindow(int argc, char *argv[])
/* If user specifyed a sequence in the config. file or on the command line then
* display it straight away. */
* display it straight away
, app exits if bad command line params supplied
. */
sequence
=
app_context
->
default_sequence
;
start
=
1
;
end
=
0
;
if
(
!
sequence
)
checkForCmdLineSequenceArgs
(
argc
,
argv
,
&
sequence
,
&
start
,
&
end
)
;
/* May exit if bad cmdline args. */
checkForCmdLineSequenceArg
(
argc
,
argv
,
&
sequence
)
;
checkForCmdLineStartEndArg
(
argc
,
argv
,
&
start
,
&
end
)
;
if
(
sequence
)
{
zmapAppCreateZMap
(
app_context
,
sequence
,
start
,
end
)
;
...
...
@@ -568,37 +572,42 @@ static gboolean removeZMapRowForeachFunc(GtkTreeModel *model, GtkTreePath *path,
}
/* Did user specify seqence/start/end on command line. */
static
void
checkForCmdLineSequenceArgs
(
int
argc
,
char
*
argv
[],
char
**
sequence_out
,
int
*
start_out
,
int
*
end_out
)
static
void
checkForCmdLineSequenceArg
(
int
argc
,
char
*
argv
[],
char
**
sequence_out
)
{
ZMapCmdLineArgsType
value
;
char
*
sequence
;
int
start
=
1
,
end
=
0
;
if
((
sequence
=
zMapCmdLineFinalArg
()))
{
if
(
zMapCmdLineArgsValue
(
ZMAPARG_SEQUENCE_START
,
&
value
))
start
=
value
.
i
;
if
(
zMapCmdLineArgsValue
(
ZMAPARG_SEQUENCE_END
,
&
value
))
end
=
value
.
i
;
*
sequence_out
=
sequence
;
return
;
}
/* Did user specify seqence/start/end on command line. */
static
void
checkForCmdLineStartEndArg
(
int
argc
,
char
*
argv
[],
int
*
start_inout
,
int
*
end_inout
)
{
ZMapCmdLineArgsType
value
;
int
start
=
*
start_inout
,
end
=
*
end_inout
;
if
(
zMapCmdLineArgsValue
(
ZMAPARG_SEQUENCE_START
,
&
value
))
start
=
value
.
i
;
if
(
zMapCmdLineArgsValue
(
ZMAPARG_SEQUENCE_END
,
&
value
))
end
=
value
.
i
;
if
(
start
!=
1
||
end
!=
0
)
if
(
start
!=
*
start_inout
||
end
!=
*
end_inout
)
{
if
(
start
<
1
||
(
end
!=
0
&&
end
<
start
))
{
if
(
start
<
1
||
(
end
!=
0
&&
end
<
start
))
{
fprintf
(
stderr
,
"Bad start/end values: start = %d, end = %d
\n
"
,
start
,
end
)
;
doTheExit
(
EXIT_FAILURE
)
;
}
fprintf
(
stderr
,
"Bad start/end values: start = %d, end = %d
\n
"
,
start
,
end
)
;
doTheExit
(
EXIT_FAILURE
)
;
}
else
{
*
start_inout
=
start
;
*
end_inout
=
end
;
}
*
sequence_out
=
sequence
;
*
start_out
=
start
;
*
end_out
=
end
;
}
return
;
}
...
...
@@ -624,6 +633,8 @@ static void checkForCmdLineVersionArg(int argc, char *argv[])
}
/* Did user specify a config directory and/or config file within that directory on the command line. */
static
void
checkConfigDir
(
void
)
{
...
...
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