Re: [Crystal-cvs] SF.net SVN: crystal:[38546] CS/trunk/libs/csutil/strcasestr.cpp
Eric Sunshine <[email protected]>
| Newsgroups | gmane.comp.graphics.crystalspace.devel |
|---|---|
| Message-ID | <CAPig+cQA13fCqU58YEQkH8L-58gkA5LP+EAeJg2xhZaCZwUukg@mail.gmail.com> |
Phil, All of my recent changes are viable candidates for the 2.0 branch. -- ES On Thursday, July 26, 2012, Philip Wyett wrote: > Hi all, > > Is this and related changes viable candidates for merging to the 2.0 tree > and > what will go out as a 2.0.1 release? > > Regards > > Phil > > > On Wednesday 25 Jul 2012 10:29:45 [email protected]<javascript:;>wrote: > > Revision: 38546 > > http://crystal.svn.sourceforge.net/crystal/?rev=38546&view=rev > > Author: sunshine > > Date: 2012-07-25 10:29:45 +0000 (Wed, 25 Jul 2012) > > Log Message: > > ----------- > > strcasestr: Add portable LGPL strcasestr(). > > > > Not all platforms supply the non-standard strcasestr(), so add a portable > > replacement (from the VLC project). MinGW on Windows is one such platform > > which does not supply strcasestr(). > > > > Added Paths: > > ----------- > > CS/trunk/libs/csutil/strcasestr.cpp > > > > Added: CS/trunk/libs/csutil/strcasestr.cpp > > =================================================================== > > --- CS/trunk/libs/csutil/strcasestr.cpp > (rev 0) > > +++ CS/trunk/libs/csutil/strcasestr.cpp 2012-07-25 10:29:45 UTC > (rev 38546) > > @@ -0,0 +1,52 @@ > > > +/************************************************************************** > > *** + * strcasestr.c: GNU strcasestr() replacement > > + > > > *************************************************************************** > > ** + * Copyright (C) 2002-2011 VLC authors and VideoLAN > > + * > > + * This program is free software; you can redistribute it and/or modify > it > > + * under the terms of the GNU Lesser General Public License as > published by > > + * the Free Software Foundation; either version 2.1 of the License, or > + * > > (at your option) any later version. > > + * > > + * This program is distributed in the hope that it will be useful, > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > + * GNU Lesser General Public License for more details. > > + * > > + * You should have received a copy of the GNU Lesser General Public > License > > + * along with this program; if not, write to the Free Software > Foundation, > > + * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + > > > *************************************************************************** > > **/ + > > +#ifdef HAVE_CONFIG_H > > +# include <config.h> > > +#endif > > + > > +#include <string.h> > > +#include <ctype.h> > > +#include <assert.h> > > + > > +char *strcasestr (const char *psz_big, const char *psz_little) > > +{ > > + char *p_pos = (char *)psz_big; > > + > > + if( !*psz_little ) return p_pos; > > + > > + while( *p_pos ) > > + { > > + if( toupper( (unsigned char)*p_pos ) == toupper( (unsigned > > char)*psz_little ) ) + { > > + char *cur1 = p_pos + 1; > > + char *cur2 = (char *)psz_little + 1; > > + while( *cur1 && *cur2 > > + && toupper( (unsigned char)*cur1 ) == toupper( (unsigned > > char)*cur2 ) ) + { > > + cur1++; > > + cur2++; > > + } > > + if( !*cur2 ) return p_pos; > > + } > > + p_pos++; > > + } > > + return NULL; > > +} > > > > > > Property changes on: CS/trunk/libs/csutil/strcasestr.cpp > > ___________________________________________________________________ > > Added: svn:mime-type > > + text/plain > > Added: svn:eol-style > > + native > > > > This was sent by the SourceForge.net collaborative development platform, > the > > world's largest Open Source development site. > > > > > > > ---------------------------------------------------------------------------- > > -- Live Security Virtual Conference > > Exclusive live event will cover all the ways today's security and > > threat landscape has changed and how IT managers can respond. Discussions > > will include endpoint security, mobile security and the latest in malware > > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________ > > Crystal-cvs mailing list > > [email protected] <javascript:;> > > https://lists.sourceforge.net/lists/listinfo/crystal-cvs > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Crystal-develop mailing list > [email protected] <javascript:;> > https://lists.sourceforge.net/lists/listinfo/crystal-develop > ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Crystal-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/crystal-develop