"Frederic Bouvier" <[EMAIL PROTECTED]> writes:

> Norman Vine wrote:
>
>> Alex Romosan writes:
>> > 
>> > "Norman Vine" <[EMAIL PROTECTED]> writes:
>> > 
>> > > Doesn't SGPath.apapend just do the right thing here ? 
>> > >
>> > > i.e. there shouldn't be a need to do the
>> > >
>> > >> ! #ifdef _MSC_VER
>> > >> !             tmp.append( ";");
>> > >> ! #else
>> > >> !             tmp.append( ":");
>> > >> ! #endif
>> > >
>> > > kludge in the patch below
>> > >
>> > > if append() doesn't do the right thing I suggest we would be
>> > > better off fixing append() rather then kludging every instance 
>> > > of it use.
>> > 
>> > we should use sgDirPathSep instead. it's defined in
>> > simgear/misc/sg_path.cxx, but it should be moved to the header file
>> > instead so it can be used elsewhere.
>> 
>> Agreed but ....
>> append() should/will just do this automagically  :-)
>> 
>> // append another piece to the existing path
>> void SGPath::append( const string& p ) {
>>     if ( path.size() == 0 ) {
>> path = p;
>>     } else {
>> if ( p[0] != sgDirPathSep ) {
>>     path += sgDirPathSep;
>> }
>> path += p;
>>     }
>>     fix();
>> }
>
> sgDirPathSep is ':' for macintosh, or '/' for other systems. It is the
> character that is between a parent and a child folder in a path, not 
> the one between 2 valid path. It that file, it is called sgSearchPathSep 
> and is used only in sgPathSplit, not in SGPath::append( const string & ).
>
> Maybe we need a SGPathList object for that matter.

sorry, i meant sgSearchPathSep (as you correctly point out). the more
i look at the code in sg_path.cxx, the more confused i get. what
exactly is it being fixed by SGPath::fix()?

--alex--

-- 
| I believe the moment is at hand when, by a paranoiac and active |
|  advance of the mind, it will be possible (simultaneously with  |
|  automatism and other passive states) to systematize confusion  |
|  and thus to help to discredit completely the world of reality. |

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to