Skip to content
Snippets Groups Projects
Commit df4c7b9e authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files
parents 50bcff45 71bd790e
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,7 @@ Compile lmfit:
$ cd lmfit
$ gcc -c lmmin.c
$ ar cr liblmmin.a lmmin.o // TODO: only needed because of qmake madness
$ cd ..
Compile and install libyaml:
......
......@@ -80,14 +80,8 @@ void NFileIO::Load_08( FILE *F_in, string flong )
mystd::fname_divide( flong, &fdir, &fshort, &fext);
if( yin_parse_file( F_in, yin ) ){
printf( "yin_parse_file failed\n" );
return;
}
if( yin==0 ){
printf( "yin=0\n" );
return;
}
yin_parse_file( F_in, yin );
if( yin==0 ) throw "yin=0\n";
yin->show( 0 );
......
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
......@@ -18,6 +18,8 @@ void CYam::show( int indent ) const
break;
case _A:
cout << "ARR";
for( i=0; i<<a.size(); ++i )
a[i]->show( indent + 2 );
break;
case _M:
cout << "MAP";
......@@ -67,16 +69,13 @@ int yinlex( yaml_event_t* yinlval ) {
*/
}
int yin_parse_file( FILE *F_in, CYam *yin )
void yin_parse_file( FILE *F_in, CYam *yin )
{
int ret;
memset(&parser, 0, sizeof(parser));
memset(&input_event, 0, sizeof(input_event));
if (!yaml_parser_initialize(&parser)) {
fprintf(stderr, "Could not initialize the parser object\n");
return -1;
}
if (!yaml_parser_initialize(&parser))
throw "Could not initialize the parser object\n";
yaml_parser_set_input_file( &parser, F_in );
......@@ -84,6 +83,4 @@ int yin_parse_file( FILE *F_in, CYam *yin )
yaml_event_delete(&input_event);
yaml_parser_delete(&parser);
return ret;
}
......@@ -22,4 +22,4 @@ class CYam {
void show( int indent) const;
};
int yin_parse_file( FILE *F_in, CYam *yin );
void yin_parse_file( FILE *F_in, CYam *yin );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment