gcc/libstdc++-v3/include/bits
Paolo Carlini 71b460210a Nathan C.
2003-06-24  Paolo Carlini  <pcarlini@unitus.it>
            Nathan C. Myers  <ncm-nospam@cantrip.org>

	* include/std/std_fstream.h (_M_filepos): Remove.
	(_M_reading, _M_writing): New, encode the various I/O modes:
	'read', 'write' and 'uncommitted'.
	(sync): If there is something to flush, do it, then go to
	'uncommitted' mode.
	* include/bits/fstream.tcc (_M_set_buffer): Overhaul to deal
	with three different cases: __off > 0 (upon underflow),
	__off == 0 (upon overflow), __off == -1 (upon open, setbuf,
	seekoff/pos).
	(_M_underflow): Don't call overflow, set _M_reading to true
	on success, tweak.
	(pbackfail): Set _M_reading to true on pback creation, tweak.
	(overflow): Don't seek, deal with overflow in 'uncommitted' mode,
	set _M_writing to true on success, tweak.
	(seekoff): Simplify, set _M_reading, _M_writing to false, call
	_M_set_buffer(-1) ('uncommitted').
	(open, close, setbuf): Set _M_reading, _M_writing to false and
	call _M_set_buffer(-1), tweak.
	(basic_filebuf): Don't set _M_buf_unified.
	(_M_destroy_internal_buffer): Don't call setg and setp.
	* include/ext/stdio_filebuf.h (stdio_filebuf): Use _M_reading,
	_M_writing and _M_set_buffer(-1).
	* include/std/std_streambuf.h (_M_move_out_cur, _M_move_in_cur,
	_M_out_lim, _M_buf_unified): Remove.
	(basic_streambuf): Don't set _M_out_lim and _M_buf_unified.
	(setp): Don't set _M_out_lim.
	* testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc: Fix for
	the new logic ('read', 'write' and 'uncommitted' modes): e.g.,
	upon open the mode is 'uncommitted' and therefore the put area
	pointers are null.
	* testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc: Ditto.
	* testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/setbuf/char/1.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc: Ditto.
	* testsuite/27_io/basic_filebuf/snextc/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/snextc/char/1-out.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputc/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputc/char/1-out.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputc/char/9701-2.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputn/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputn/char/1-out.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputn/char/9701-1.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc: Ditto.

	* include/bits/fstream.tcc (showmanyc): Use only the
	documented derivation interface to basic_streambuf (gptr(),
	setg(), etc.) to work right with user specializations.
	* include/bits/streambuf.tcc (sbumpc, sputbackc, sungetc,
	sputc, xsgetn, xsputn, __copy_streambufs): Likewise.
	* include/std/std_streambuf.h (in_avail, sgetc, uflow, stossc):
	Likewise.
	* include/std/std_fstream.h (_M_create_pback, _M_destroy_pback,
	xsgetn): Likewise.

Co-Authored-By: Nathan C. Myers <ncm-nospam@cantrip.org>

From-SVN: r68420
2003-06-24 13:48:11 +00:00
..
allocator_traits.h [multiple changes] 2003-06-11 15:52:11 +00:00
allocator.h [multiple changes] 2003-06-11 15:52:11 +00:00
basic_ios.h std_fstream.h (basic_filebuf::_M_codecvt): Add cached member. 2003-05-13 20:13:15 +00:00
basic_ios.tcc std_fstream.h (basic_filebuf::_M_codecvt): Add cached member. 2003-05-13 20:13:15 +00:00
basic_string.h fix basic_string::replace for integral types 2003-06-20 22:12:18 +00:00
basic_string.tcc fix basic_string::replace for integral types 2003-06-20 22:12:18 +00:00
boost_concept_check.h Types _D -> _Diff, _R -> _Ref 2003-06-23 16:18:53 +00:00
c++config Daily bump. 2003-06-24 00:16:07 +00:00
char_traits.h
codecvt.h [multiple changes] 2003-02-06 06:24:21 +00:00
concept_check.h std_bitset.h (_M_do_find_next): Fix -Wall nit. 2003-04-15 06:11:10 +00:00
cpp_type_traits.h re PR libstdc++/3181 (Unable to use sqrt,cos,sin,... with int argument.) 2003-05-11 09:07:17 +00:00
demangle.h demangle.h: Prepend accessors of class qualifier with 'get_' in order to fix warnings when... 2003-03-11 13:48:16 +00:00
deque.tcc BUGS: Update from 2.90.8 snapshot. 2003-06-10 21:52:25 +00:00
fpos.h
fstream.tcc Nathan C. 2003-06-24 13:48:11 +00:00
functexcept.h
gslice_array.h
gslice.h
indirect_array.h
ios_base.h [multiple changes] 2003-05-11 04:20:57 +00:00
istream.tcc re PR libstdc++/11095 (C++ iostream manipulator causes segfault when called iwth negative argument) 2003-06-05 23:25:05 +00:00
list.tcc BUGS: Update from 2.90.8 snapshot. 2003-06-10 21:52:25 +00:00
locale_classes.h std_fstream.h (basic_filebuf::_M_codecvt): Add cached member. 2003-05-13 20:13:15 +00:00
locale_facets.h stl_algo.h: Enums as _S_. 2003-05-07 05:01:59 +00:00
locale_facets.tcc locale_facets.tcc (do_get): Honor $22.2.6.3.3/8 and make sure the number of digits required after the... 2003-05-27 17:14:49 -04:00
localefwd.h std_fstream.h (basic_filebuf::_M_codecvt): Add cached member. 2003-05-13 20:13:15 +00:00
mask_array.h
ostream.tcc re PR libstdc++/11095 (C++ iostream manipulator causes segfault when called iwth negative argument) 2003-06-05 23:25:05 +00:00
slice_array.h
sstream.tcc Nathan C. 2003-06-22 18:37:10 +00:00
stl_algo.h BUGS: Update from 2.90.8 snapshot. 2003-06-10 21:52:25 +00:00
stl_algobase.h BUGS: Update from 2.90.8 snapshot. 2003-06-10 21:52:25 +00:00
stl_bvector.h BUGS: Update from 2.90.8 snapshot. 2003-06-10 21:52:25 +00:00
stl_construct.h
stl_deque.h [multiple changes] 2003-06-11 15:52:11 +00:00
stl_function.h
stl_heap.h
stl_iterator_base_funcs.h BUGS: Update from 2.90.8 snapshot. 2003-06-10 21:52:25 +00:00
stl_iterator_base_types.h
stl_iterator.h 2003-06-06 Nathan Myers <ncm-nospam@cantrip.org> 2003-06-06 17:19:56 +00:00
stl_list.h BUGS: Update from 2.90.8 snapshot. 2003-06-10 21:52:25 +00:00
stl_map.h re PR libstdc++/9811 (incorrect documentation for std::map::lower_bound, etc.) 2003-02-25 06:27:10 +00:00
stl_multimap.h re PR libstdc++/9811 (incorrect documentation for std::map::lower_bound, etc.) 2003-02-25 06:27:10 +00:00
stl_multiset.h BUGS: Update from 2.90.8 snapshot. 2003-06-10 21:52:25 +00:00
stl_numeric.h BUGS: Update from 2.90.8 snapshot. 2003-06-10 21:52:25 +00:00
stl_pair.h
stl_queue.h
stl_raw_storage_iter.h
stl_relops.h BUGS: Update from 2.90.8 snapshot. 2003-06-10 21:52:25 +00:00
stl_set.h BUGS: Update from 2.90.8 snapshot. 2003-06-10 21:52:25 +00:00
stl_stack.h
stl_tempbuf.h
stl_threads.h acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Simplify. 2003-06-12 03:24:16 +00:00
stl_tree.h [multiple changes] 2003-06-11 15:52:11 +00:00
stl_uninitialized.h BUGS: Update from 2.90.8 snapshot. 2003-06-10 21:52:25 +00:00
stl_vector.h BUGS: Update from 2.90.8 snapshot. 2003-06-10 21:52:25 +00:00
stream_iterator.h
streambuf_iterator.h streambuf_iterator.h (_M_put): Set _M_failed if sputn fails. 2003-03-07 14:14:11 +00:00
streambuf.tcc Nathan C. 2003-06-24 13:48:11 +00:00
stringfwd.h
type_traits.h
valarray_after.h valarray_meta.h: Remove, split into ... 2003-01-24 16:32:11 +00:00
valarray_array.h
valarray_array.tcc
valarray_before.h re PR libstdc++/9234 (unary minus for valarrays broken) 2003-02-03 10:38:36 +00:00
vector.tcc BUGS: Update from 2.90.8 snapshot. 2003-06-10 21:52:25 +00:00