Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
Zipr Toolchain
Commits
1f8ea984
Commit
1f8ea984
authored
6 years ago
by
Jason Hiser
Browse files
Options
Downloads
Patches
Plain Diff
fixed arg parsing snafus.
parent
85fb4028
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
mg_driver.cpp
+3
-24
3 additions, 24 deletions
mg_driver.cpp
with
3 additions
and
24 deletions
mg_driver.cpp
+
3
−
24
View file @
1f8ea984
...
...
@@ -52,29 +52,9 @@ bool use_stars=true;
int
parseArgs
(
const
vector
<
string
>
step_args
)
{
auto
argv
=
vector
<
char
*>
();
auto
argv
=
vector
<
char
*>
(
{
const_cast
<
char
*>
(
"libmove_globals.so"
)}
);
transform
(
ALLOF
(
step_args
),
back_inserter
(
argv
),
[](
const
string
&
s
)
->
char
*
{
return
const_cast
<
char
*>
(
s
.
c_str
());
}
);
const
auto
argc
=
step_args
.
size
();
/*
* Check that we've been called correctly:
* <program> <variant id> <annotation file>
*/
#if 0
if(argc < 1)
{
usage(programName);
return 2;
}
#endif
#if 0
variantID = strtol(step_args[0].c_str(), &strtolError, 10);
if (*strtolError != '\0')
{
cerr << "Invalid variantID: " << step_args[0] << endl;
return 1;
}
#endif
const
auto
argc
=
argv
.
size
();
// Parse some options for the transform
const
static
struct
option
long_options
[]
=
{
...
...
@@ -96,8 +76,7 @@ int parseArgs(const vector<string> step_args)
auto
short_opts
=
"b:oh?m:d:n:aAst"
;
while
(
1
)
{
int
index
=
0
;
int
c
=
getopt_long
(
argc
,
&
argv
[
0
],
short_opts
,
long_options
,
&
index
);
int
c
=
getopt_long
(
argc
,
&
argv
[
0
],
short_opts
,
long_options
,
nullptr
);
if
(
c
==
-
1
)
break
;
switch
(
c
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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