Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
icc1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Cristian Weiland
icc1
Commits
63f0b79b
Commit
63f0b79b
authored
9 years ago
by
Cristian Weiland
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.c3sl.ufpr.br:cw14/icc1
parents
340bf3ca
93a0c33d
No related branches found
No related tags found
1 merge request
!1
Develop
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
interface.c
+40
-0
40 additions, 0 deletions
interface.c
with
40 additions
and
0 deletions
interface.c
0 → 100644
+
40
−
0
View file @
63f0b79b
#include
<stdio.h>
#include
<stdlib.h>
#include
<string.h>
#include
<errno.h>
#define ARGS_NUM 9
double
Hx
,
Hy
;
int
MaxIter
;
FILE
*
fp
;
void
print_errno
(
void
)
{
printf
(
"%s"
,
strerror
(
errno
));
}
void
getParams
(
int
argc
,
char
*
argv
[])
{
if
(
argc
!=
ARGS_NUM
)
{
fprintf
(
stderr
,
"Wrong number of arguments.
\n
"
);
exit
(
-
1
);
}
int
i
;
for
(
i
=
1
;
i
<
ARGS_NUM
;
i
+=
2
)
{
if
(
strcmp
(
argv
[
i
],
"-hx"
)
==
0
)
{
Hx
=
atof
(
argv
[
i
+
1
]);
}
else
if
(
strcmp
(
argv
[
i
],
"-hy"
)
==
0
)
{
Hy
=
atof
(
argv
[
i
+
1
]);
}
else
if
(
strcmp
(
argv
[
i
],
"-i"
)
==
0
)
{
MaxIter
=
atoi
(
argv
[
i
+
1
]);
}
else
if
(
strcmp
(
argv
[
i
],
"-o"
)
==
0
)
{
fp
=
fopen
(
argv
[
i
+
1
],
"w"
);
}
else
{
fprintf
(
stderr
,
"Incorrect parameter.
\n
"
);
exit
(
-
1
);
}
}
}
int
main
(
int
argc
,
char
*
argv
[])
{
getParams
(
argc
,
argv
);
}
\ No newline at end of file
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