Commit eda600e8 by Jason Merrill

Makefile.in (VERSION): Bump to 2.9.0.

	* Makefile.in (VERSION): Bump to 2.9.0.
	* std/bastring.cc (find_last_of): Fix.
	(find_last_not_of): Likewise.

From-SVN: r21072
parent b0e7d996
1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
* Makefile.in (VERSION): Bump to 2.9.0.
1998-07-12 Lars Albertsson <lalle@sics.se>
* std/bastring.cc (find_last_of): Fix.
(find_last_not_of): Likewise.
1998-07-06 Manfred Hollstein <manfred@s-direktnet.de> 1998-07-06 Manfred Hollstein <manfred@s-direktnet.de>
* configure.in (INSTALLDIR): Make sed pattern failsafe. * configure.in (INSTALLDIR): Make sed pattern failsafe.
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# along with this library; see the file COPYING. If not, write to the Free # along with this library; see the file COPYING. If not, write to the Free
# Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
VERSION = 2.8.0 VERSION = 2.9.0
OBJS = cstringi.o stdexcepti.o cstdlibi.o cmathi.o stlinst.o OBJS = cstringi.o stdexcepti.o cstdlibi.o cmathi.o stlinst.o
SUBLIBS = $(STAMP)-string $(STAMP)-complx SUBLIBS = $(STAMP)-string $(STAMP)-complx
...@@ -55,10 +55,6 @@ INSTALLDIR = $(libdir) ...@@ -55,10 +55,6 @@ INSTALLDIR = $(libdir)
MOSTLYCLEAN_JUNK = *stmp-* tlib*.a *.s *.ii stdlist piclist MOSTLYCLEAN_JUNK = *stmp-* tlib*.a *.s *.ii stdlist piclist
CLEAN_JUNK = $(LIBS) CLEAN_JUNK = $(LIBS)
# Remove these for public releases.
CXXFLAGS = -g -O -Wpointer-arith -Wnested-externs -Woverloaded-virtual -Wbad-function-cast -Winline -Wwrite-strings -Weffc++
CFLAGS = -g -O -Wpointer-arith -Wnested-externs
.PHONY: libs .PHONY: libs
libs: $(LIBS) libs: $(LIBS)
...@@ -305,19 +301,22 @@ install: ...@@ -305,19 +301,22 @@ install:
.PHONY: force .PHONY: force
force: force:
# Remove these for public releases.
MYCXXFLAGS = -g -O2 -Wpointer-arith -Wnested-externs -Woverloaded-virtual -Wbad-function-cast -Winline -Wwrite-strings
MYCFLAGS = -g -O2 -Wpointer-arith -Wnested-externs
.PHONY: stuff .PHONY: stuff
stuff: stuff:
$(MAKE) clean $(MAKE) stuff1
$(MAKE) -C ../libio c++clean $(MAKE) stuff2
-$(MAKE) $(MAKEFLAGS) check
-$(MAKE) -C ../libio check
-$(MAKE) -C ../../gcc check-g++
stuff1: stuff1:
$(MAKE) clean $(MAKE) clean
$(MAKE) -C ../libio c++clean $(MAKE) -C ../libio c++clean
touch ../../gcc/libgcc2.ready
stuff2: stuff2:
-$(MAKE) check -$(MAKE) -C ../../gcc/ libgcc.a
-$(MAKE) check CXXFLAGS="$(MYCXXFLAGS)" CFLAGS="$(MYCFLAGS)"
-$(MAKE) -C ../libio check -$(MAKE) -C ../libio check
-$(MAKE) -C ../../gcc check-g++ -$(MAKE) -C ../../gcc check-g++
...@@ -325,10 +325,12 @@ basic_string <charT, traits, Allocator>::size_type ...@@ -325,10 +325,12 @@ basic_string <charT, traits, Allocator>::size_type
basic_string <charT, traits, Allocator>:: basic_string <charT, traits, Allocator>::
find_last_of (const charT* s, size_type pos, size_type n) const find_last_of (const charT* s, size_type pos, size_type n) const
{ {
if (length() == 0)
return npos;
size_t xpos = length () - 1; size_t xpos = length () - 1;
if (xpos > pos) if (xpos > pos)
xpos = pos; xpos = pos;
for (; xpos; --xpos) for (++xpos; xpos-- > 0;)
if (_find (s, data () [xpos], 0, n) != npos) if (_find (s, data () [xpos], 0, n) != npos)
return xpos; return xpos;
return npos; return npos;
...@@ -363,10 +365,12 @@ basic_string <charT, traits, Allocator>::size_type ...@@ -363,10 +365,12 @@ basic_string <charT, traits, Allocator>::size_type
basic_string <charT, traits, Allocator>:: basic_string <charT, traits, Allocator>::
find_last_not_of (const charT* s, size_type pos, size_type n) const find_last_not_of (const charT* s, size_type pos, size_type n) const
{ {
if (length() == 0)
return npos;
size_t xpos = length () - 1; size_t xpos = length () - 1;
if (xpos > pos) if (xpos > pos)
xpos = pos; xpos = pos;
for (; xpos; --xpos) for (++xpos; xpos-- > 0;)
if (_find (s, data () [xpos], 0, n) == npos) if (_find (s, data () [xpos], 0, n) == npos)
return xpos; return xpos;
return npos; return npos;
...@@ -377,10 +381,12 @@ basic_string <charT, traits, Allocator>::size_type ...@@ -377,10 +381,12 @@ basic_string <charT, traits, Allocator>::size_type
basic_string <charT, traits, Allocator>:: basic_string <charT, traits, Allocator>::
find_last_not_of (charT c, size_type pos) const find_last_not_of (charT c, size_type pos) const
{ {
if (length() == 0)
return npos;
size_t xpos = length () - 1; size_t xpos = length () - 1;
if (xpos > pos) if (xpos > pos)
xpos = pos; xpos = pos;
for (; xpos; --xpos) for (++xpos; xpos-- > 0;)
if (traits::ne (data () [xpos], c)) if (traits::ne (data () [xpos], c))
return xpos; return xpos;
return npos; return npos;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment