Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
1c2bc912
Commit
1c2bc912
authored
Jun 07, 2012
by
Houtan Bastani
Browse files
config file: only allow GlobalInitFile option to hooks block, one more error check
parent
585c98e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
preprocessor/ConfigFile.cc
View file @
1c2bc912
...
@@ -220,10 +220,19 @@ ConfigFile::getConfigFileInfo(const string &config_file)
...
@@ -220,10 +220,19 @@ ConfigFile::getConfigFileInfo(const string &config_file)
trim
(
tokenizedLine
.
back
());
trim
(
tokenizedLine
.
back
());
if
(
inHooks
)
if
(
inHooks
)
{
if
(
!
tokenizedLine
.
front
().
compare
(
"GlobalInitFile"
))
if
(
!
tokenizedLine
.
front
().
compare
(
"G
lobal
I
nit
F
ile
"
))
if
(
g
lobal
_i
nit
_f
ile
.
empty
(
))
global_init_file
=
tokenizedLine
.
back
();
global_init_file
=
tokenizedLine
.
back
();
}
else
{
cerr
<<
"ERROR: May not have more than one GlobalInitFile option in [hooks] block."
<<
endl
;
exit
(
EXIT_FAILURE
);
}
else
{
cerr
<<
"ERROR: Unrecognized option "
<<
tokenizedLine
.
front
()
<<
" in [hooks] block."
<<
endl
;
exit
(
EXIT_FAILURE
);
}
else
else
if
(
!
tokenizedLine
.
front
().
compare
(
"Name"
))
if
(
!
tokenizedLine
.
front
().
compare
(
"Name"
))
name
=
tokenizedLine
.
back
();
name
=
tokenizedLine
.
back
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment