1
0
Fork 0

Proper handling of lowercase filenames by hgtchop.

This commit is contained in:
Maxime Guillaud 2011-11-10 08:39:04 +01:00 committed by Christian Schmitt
parent e4c19fefee
commit e37fc96f4d

View file

@ -123,11 +123,11 @@ TGHgt::open ( const SGPath &f ) {
string name = file_name.file(); string name = file_name.file();
cout << " Name = " << name << endl; cout << " Name = " << name << endl;
originy = atof( name.substr(1, 2).c_str() ) * 3600.0; originy = atof( name.substr(1, 2).c_str() ) * 3600.0;
if ( name.substr(0, 1) == "S" ) { if ( name.substr(0, 1) == "S" || name.substr(0, 1) == "s" ) {
originy = -originy; originy = -originy;
} }
originx = atof( name.substr(4, 3).c_str() ) * 3600.0; originx = atof( name.substr(4, 3).c_str() ) * 3600.0;
if ( name.substr(3, 1) == "W" ) { if ( name.substr(3, 1) == "W" || name.substr(3, 1) == "w") {
originx = -originx; originx = -originx;
} }
cout << " Origin = " << originx << ", " << originy << endl; cout << " Origin = " << originx << ", " << originy << endl;