Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
a80de3f5
Commit
a80de3f5
authored
May 24, 2017
by
Uwe Schulzweida
Browse files
Remove unused function template_parser().
parent
761e069f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/template_parser.cc
View file @
a80de3f5
...
...
@@ -19,62 +19,6 @@ xmlDoc *param_doc;
void
*
magics_node
,
*
results_node
;
// not used
static
int
template_parser
(
char
*
Filename
,
const
char
*
varname
)
{
#if defined(HAVE_LIBXML2)
xmlDoc
*
doc
=
NULL
;
xmlNode
*
root_element
=
NULL
;
doc
=
xmlReadFile
(
Filename
,
NULL
,
0
);
if
(
doc
==
NULL
)
{
printf
(
"Error: Could not parse the file
\"
%s
\"\n
"
,
Filename
);
return
(
1
);
}
else
{
/*
Get the name of the root element node
If "magics" , call "magics" parser
If "results", call "results" parser
*/
root_element
=
xmlDocGetRootElement
(
doc
);
if
(
!
strcmp
(
(
const
char
*
)
root_element
->
name
,
"magics"
)
)
{
if
(
magics_template_parser
(
root_element
)
==
1
)
{
printf
(
"Un-Supported version of Magics++!
\n
"
);
return
(
2
);
}
}
else
if
(
!
strcmp
(
(
const
char
*
)
root_element
->
name
,
"results"
)
)
{
results_template_parser
(
root_element
,
varname
);
/* Needs some error handling */
}
/*** free the document ***/
xmlFreeDoc
(
doc
);
}
/*** Free the global variables that may
* have been allocated by the parser.
***/
xmlCleanupParser
();
#else
cdoAbort
(
"XML2 support not compiled in!"
);
#endif
return
0
;
}
int
init_XMLtemplate_parser
(
char
*
Filename
)
{
...
...
Write
Preview
Markdown
is supported
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