Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
SWIFT
SWIFTsim
Commits
5258696e
Commit
5258696e
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Code formatting
parent
14c6987f
No related branches found
No related tags found
1 merge request
!140
First version of main() using a parameter file to get constants.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/parser.c
+3
-3
3 additions, 3 deletions
src/parser.c
with
3 additions
and
3 deletions
src/parser.c
+
3
−
3
View file @
5258696e
...
...
@@ -184,8 +184,8 @@ static void parse_line(char *line, struct swift_params *params) {
static
void
parse_value
(
char
*
line
,
struct
swift_params
*
params
)
{
static
int
inSection
=
0
;
static
char
section
[
PARSER_MAX_LINE_SIZE
];
/* Keeps track of current section
name. */
static
char
section
[
PARSER_MAX_LINE_SIZE
];
/* Keeps track of current section
name. */
static
int
isFirstParam
=
1
;
char
tmpStr
[
PARSER_MAX_LINE_SIZE
];
...
...
@@ -208,7 +208,7 @@ static void parse_value(char *line, struct swift_params *params) {
/* Check that it is a parameter inside a section.*/
if
(
*
line
==
' '
||
*
line
==
'\t'
)
{
parse_section_param
(
line
,
&
isFirstParam
,
section
,
params
);
}
else
{
/*Else it is the start of a new section or standalone parameter. */
}
else
{
/*Else it is the start of a new section or standalone parameter. */
/* Take first token as the parameter name. */
token
=
strtok
(
line
,
" :
\t
"
);
strcpy
(
tmpStr
,
token
);
...
...
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