delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2002/05/14/11:28:21

Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm
Sender: cygwin-apps-owner AT cygwin DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT cygwin DOT com>
List-Help: <mailto:cygwin-apps-help AT cygwin DOT com>, <http://sources.redhat.com/lists.html#faqs>
Mail-Followup-To: cygwin-apps AT cygwin DOT com
Delivered-To: mailing list cygwin-apps AT cygwin DOT com
Date: Tue, 14 May 2002 11:28:08 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin-apps AT cygwin DOT com
Subject: Re: Setup 2.218.2.4 (fixed?)
Message-ID: <20020514152808.GA25899@redhat.com>
Reply-To: cygwin-apps AT cygwin DOT com
Mail-Followup-To: cygwin-apps AT cygwin DOT com
References: <20020514045726 DOT GA23058 AT redhat DOT com> <NCBBIHCHBLCMLBLOBONKEELACOAA DOT g DOT r DOT vansickle AT worldnet DOT att DOT net>
Mime-Version: 1.0
In-Reply-To: <NCBBIHCHBLCMLBLOBONKEELACOAA.g.r.vansickle@worldnet.att.net>
User-Agent: Mutt/1.3.23.1i

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019