Revision: 7784
http://playerstage.svn.sourceforge.net/playerstage/?rev=7784&view=rev
Author: hsujohnhsu
Date: 2009-06-05 04:19:41 +0000 (Fri, 05 Jun 2009)
Log Message:
-----------
colon delim list of dirs.
Modified Paths:
--------------
code/gazebo/branches/bullet/server/GazeboConfig.cc
Modified: code/gazebo/branches/bullet/server/GazeboConfig.cc
===================================================================
--- code/gazebo/branches/bullet/server/GazeboConfig.cc 2009-06-05 01:50:26 UTC
(rev 7783)
+++ code/gazebo/branches/bullet/server/GazeboConfig.cc 2009-06-05 04:19:41 UTC
(rev 7784)
@@ -56,15 +56,35 @@
cfgFile.open(rcFilename.c_str(), std::ios::in);
+ std::string delim(":");
+
char *ogre_resource_path = getenv("OGRE_RESOURCE_PATH");
if(ogre_resource_path)
{
- this->ogrePaths.push_back(ogre_resource_path);
+ std::string str(ogre_resource_path);
+ int pos1 = 0;
+ int pos2 = str.find(delim);
+ while (pos2 != (int)std::string::npos)
+ {
+ this->ogrePaths.push_back(str.substr(pos1,pos2-pos1+1));
+ pos1 = pos2+1;
+ pos2 = str.find(delim,pos2+1);
+ }
+ this->ogrePaths.push_back(str.substr(pos1,str.size()-pos1));
}
char *gazebo_resource_path = getenv("GAZEBO_RESOURCE_PATH");
if(gazebo_resource_path)
{
- this->gazeboPaths.push_back(gazebo_resource_path);
+ std::string str(gazebo_resource_path);
+ int pos1 = 0;
+ int pos2 = str.find(delim);
+ while (pos2 != (int)std::string::npos)
+ {
+ this->gazeboPaths.push_back(str.substr(pos1,pos2-pos1));
+ pos1 = pos2+1;
+ pos2 = str.find(delim,pos2+1);
+ }
+ this->gazeboPaths.push_back(str.substr(pos1,str.size()-pos1));
}
if (cfgFile)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit