File tree Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -1000,7 +1000,7 @@ int main(int argc, char* argv[]){
1000
1000
add_joint_suffix = false ;
1001
1001
nargc--;
1002
1002
} else if (strcmp (argv[i], " --verbose" ) == 0 ) {
1003
- verbose = false ;
1003
+ verbose = true ;
1004
1004
nargc--;
1005
1005
}
1006
1006
}
@@ -1059,10 +1059,21 @@ int main(int argc, char* argv[]){
1059
1059
BOOST_FOREACH (string& limb, limb_candidates) {
1060
1060
#ifdef USE_CURRENT_YAML
1061
1061
if (doc[limb]) {
1062
+ int line=-1 ;
1063
+ ifstream fin2 (yaml_filename); // super ugry hack until yaml-cpp 0.5.2
1064
+ string buffer;
1065
+ for (;fin2;) {
1066
+ getline (fin2, buffer); line++;
1067
+ if (buffer == limb+" :" ) break ;
1068
+ }
1069
+ fin2.close ();
1062
1070
if (verbose) {
1063
- std::cerr << limb << " @" << doc[limb].size () << std::endl;
1071
+ std::cerr << limb << " @" << line << std::endl;
1072
+ }
1073
+ if (line<0 ) {
1074
+ std::cerr << limb << " @" << line << " someting is wrong..." << std::endl;
1064
1075
}
1065
- limb_order.push_back (pair<string, size_t >(limb, doc[limb]. size () ));
1076
+ limb_order.push_back (pair<string, size_t >(limb, line ));
1066
1077
}
1067
1078
#else
1068
1079
if ( doc.FindValue (limb) ) {
Original file line number Diff line number Diff line change @@ -504,8 +504,16 @@ void ModelEuslisp::readYaml (string &config_file) {
504
504
BOOST_FOREACH (string& limb, limb_candidates) {
505
505
#ifdef USE_CURRENT_YAML
506
506
if (doc[limb]) {
507
- std::cerr << limb << " @" << doc[limb].size () << std::endl;
508
- limb_order.push_back (pair<string, size_t >(limb, doc[limb].size ()));
507
+ int line=0 ;
508
+ ifstream fin2 (config_file.c_str ()); // super ugry hack until yaml-cpp 0.5.2
509
+ string buffer;
510
+ for (;fin2;) {
511
+ getline (fin2, buffer); line++;
512
+ if (buffer == limb+" :" ) break ;
513
+ }
514
+ fin2.close ();
515
+ std::cerr << limb << " @" << line << std::endl;
516
+ limb_order.push_back (pair<string, size_t >(limb, line));
509
517
}
510
518
#else
511
519
if ( doc.FindValue (limb) ) {
You can’t perform that action at this time.
0 commit comments