Setup 2.218.2.4 (fixed?)

Christopher Faylor cgf@redhat.com
Tue May 14 08:28:00 GMT 2002


On Tue, May 14, 2002 at 12:36:50AM -0500, Gary R. Van Sickle wrote:
>>
>> Can I suggest that probably setup.exe needs something like a "suffix"
>> function which operates similarly to strstr but only returns a non-NULL
>> pointer if the string matches the last strlen(string) characters of
>> a path?
>>
>
>What's worked well for me in the past in such situations is to just derive a
>Path class from std::string, and give it members such as GetFilename(),
>GetFullPath(), etc.  I could knock out something analagous pretty quick I should
>think, maybe consolidating our two string classes (cistring and String) in the
>process....

If you look at the code, it isn't as simple as just getting the filename.
There are also things like strstr (foo, ".tar.bz2").  I guess you could make
something like GetExtension (foo, 2) to accommodate that.

cgf



More information about the Cygwin-apps mailing list