octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: proposed fileparts patch


From: Hall, Benjamin
Subject: RE: proposed fileparts patch
Date: Thu, 23 Oct 2008 15:43:33 -0400

 

|-----Original Message-----
|From: John W. Eaton [mailto:address@hidden 
|Sent: Thursday, October 23, 2008 2:58 PM
|To: Hall, Benjamin
|Cc: octave maintainers mailing list
|Subject: proposed fileparts patch

|| !       if ( ispc )
|
|I'd prefer to avoid checks for "ispc" in the Octave sources if
|possible.
|
|In the C++ sources, we have file_ops::is_dir_sep, which will return
|true for either / or \ on Windows systems.  Perhaps we should export
|it in some way to the scripting language?  Or we could have another
|function that produces a list of file separators, like the
|file_ops::dir_sep_chars function does in the C++ sources.
|
|jwe
|

I agree that the ispc is ugly.  I saw the is_sep_chars in the c++ and I agree 
that a better solution would use that information (rather than having 
effectively the same information in 2 different places).  What would we call 
such a function, fileseplist or just dir_sep_chars?  I'll attempt a patch at 
dirfns.cc for that next week.

The only potential corner case is the filename 'c:somefile.txt', but I don't 
think that is good practice for specifying filenames (at least I don't intend 
to use it).  If we ignore this case, then I think it will be possible to 
eliminate ispc() entirely.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]