2001-03-19  Jonathan Larmour  <jlarmour@redhat.com>

	* src/common/stream.cxx (refill_read_buffer): Flush all streams here...
	(read): ...rather than here, or...
	(read_byte): ...here.
	This means less flushing, which improves performance.

	* src/input/fgets.cxx: Add a reminder comment to improve this later.
	* src/input/gets.cxx: Ditto.


2001-03-16  Jonathan Larmour  <jlarmour@redhat.com>

	* include/stream.hxx (class Cyg_StdioStream): Improve member visibility.

	* src/common/stream.cxx (refill_read_buffer): Ensure eof is set.
	* src/common/feof.cxx: New file. Implements the long lost
	feof(), ferror() and clearerr() functions which were MIA for
	no good reason.
	* cdl/stdio.cdl: Build it.

2001-03-15  Jonathan Larmour  <jlarmour@redhat.com>

	* cdl/stdio.cdl (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE): Default to
	tty default console.

	* src/input/fgets.cxx (fgets): Reimplement to work with EOF properly.
	Add tracing.
	* src/input/gets.cxx (gets): Ditto.

	* include/io.hxx, include/io.inl, include/stream.hxx,
	include/stream.inl, include/streambuf.hxx, include/streambuf.inl:
	Silence warnings from recent compilers.

2001-02-01  Jonathan Larmour  <jlarmour@redhat.com>

	* cdl/stdio.cdl (CYGPKG_LIBC_STDIO_OPEN): Implements
	CYGINT_ISO_STDIO_POSIX_FDFUNCS ( fileno() and fdopen() ).

2000-11-01  Jonathan Larmour  <jlarmour@redhat.com>

	* include/stdio.h: Make FILE array type larger to be more resistant
	against small data sections.
	Lose the cyg_libc_stdio_stdin/out/err definitions with macros for
	stdin/stdout/err since it can cause problems with libgcc exception
	code. Instead just make these extern FILE *s.
	* src/common/stderr.cxx:
	* src/common/stdin.cxx:
	* src/common/stdout.cxx:
	Define objects with init priority corresponding to order the fd's
	should be allocated where applicable.
	Define actual stdin, stdout, stderr externally visible constants to
	point to the streams.

	* cdl/stdio.cdl: Support CYGINT_ISO_STDIO_STREAMS interface

	* src/common/fopen.cxx (fdopen): return f as intended

2000-10-23  Jesper Skov  <jskov@redhat.com>

	* include/streambuf.inl: Adjust assertions to cope with buffers
	generated by sprintf and similar non-bound-buffer calls.

2000-08-09  Jonathan Larmour  <jlarmour@redhat.co.uk>

	* include/io.inl: No need to include string.h

	* cdl/stdio.cdl: Add some more requires statements

2000-08-07  Jonathan Larmour  <jlarmour@redhat.co.uk>

	* src/common/stream.cxx (Cyg_StdioStream::Cyg_StdioStream):
	Only call io_buf members conditionally.

2000-08-03  Jonathan Larmour  <jlarmour@redhat.co.uk>

	* src/common/fseek.cxx: Include assertion and tracing support since
	they are used.

2000-07-20  Nick Garnett  <nickg@cygnus.co.uk>

	* include/stream.hxx (class Cyg_StdioStream): Added get_dev()
	accessor member function to return underlying device handle.

	* src/common/fopen.cxx: Added fdopen() and fileno(). Reorganized
	fopen() so that code common with fdopen() is now in a separate
	function.

	* src/common/stdiosupp.cxx (Cyg_libc_stdio_find_filename): Removed
	compiler warning.

2000-07-13  Nick Garnett  <nickg@cygnus.co.uk>

	* cdl/stdio.cdl: Added common/fseek.cxx to compile list.
	Reorganized options for stream buffering:
	CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF now controls whether the user
	can attach their own buffer to the stream.
	CYGSEM_LIBC_STDIO_SETVBUF_MALLOC controls whether buffers can be
	malloced or only statically defined.
	Added CYGPKG_LIBC_STDIO_FILEIO option to control whether the STDIO
	package uses the FILEIO package for all IO, or goes directly to
	the device drivers as before.

	* include/stdio.h: Added file positioning calls defined in section
	7.9.9 of the standard.

	* include/io.hxx: 
	* include/io.inl:
	Added these files to define an abstraction layer for access to the
	real device underlying an IO stream. Depending on
	CYGPKG_LIBC_STDIO_FILEIO this either goes to the FILEIO package or
	directly to the device drivers.
	
	* include/stream.hxx:
	Modifications to use io.hxx abstractions.
	Added second constructor for creating a buffer-only stream.
	Added initialize() function which contains most of the common
	stream initialization code.
	Added a close() member function.

	* include/stream.inl:
	Modifications to use io.hxx abstractions.
	Moved most of the work of the destructor into close() member.
	Added FILEIO version of set_position() member function.
	
	* include/streambuf.hxx:
	* include/streambuf.inl:
	* src/common/streambuf.cxx: 
	Rearranged to match new buffering configuration options.

	* src/common/stream.cxx:
	Modifications to use io.hxx abstractions.
	Added second constructor, and moved common initialization code to
	initialize() member function.
	Added code to make position member correctly track current file
	position.

	* src/common/fopen.cxx:
	Fixed handling of write/append in process_mode().
	Moved call of process_mode() to before call to cyg_stdio_open() so
	that stream modes may be passed in.
	Added code to detect an interactive stream and choose non-buffered
	mode - fully buffered is now the default.
	Added calls to cyg_stdio_close() where appropriate.

	* src/output/vfnprintf.cxx: Removed FLUSH() macro and its
	uses. Deciding to flush should be in the hands of the buffer code,
	or the user calling fflush().

	* src/common/vsscanf.cxx:
	Added FILEIO variant of vsscanf(). This uses a precharged stream
	object to emulate input.

	* src/common/vsnprintf.cxx: 
	Added FILEIO variant of vsnprintf(). This uses the standard stream
	object to print into the supplied buffer.
	
	* src/common/fseek.cxx:
	Added this file to implement file positioning functions.

	* src/common/fclose.cxx (fclose):
	Added call to Cyg_StdioStream::close().

	* include/stdiosupp.hxx:
	* src/common/stdiosupp.cxx: 
	Modified Cyg_libc_stdio_find_filename() to take mode, binary and
	append arguments.

	* src/common/stdin.cxx: 
	* src/common/stdout.cxx: 
	* src/common/stderr.cxx:
	Modified calls to Cyg_libc_stdio_find_filename() to pass
	appropriate values for mode, binary and append arguments.

2000-06-18  Jonathan Larmour  <jlarmour@redhat.co.uk>

	* src/common/vsscanf.cxx: Add NULL select entry to DEVIO_TABLE
	* src/common/vsnprintf.cxx: Likewise

2000-05-25  Hugo Tyson  <hmt@cygnus.co.uk>
 
        * include/stream.inl (set_error): If the error is EEOF, set
        the EOF flag (flags.at_eof) so that clients know.
 
        * src/input/fgetc.cxx (__fgetc):
        * src/input/fgets.cxx (_fgets):
        * src/input/fread.cxx (_fread): Correctly handle an error,
        or EOF indication, from real_stream->refill_read_buffer().

2000-05-02  Jonathan Larmour  <jlarmour@redhat.co.uk>

	* New package
	Separated original libc out into separate packages on functional
	boundaries.
	Header files are now managed by isoinfra package
	Plenty of cleanups done, but no major functionality changes

//===========================================================================
//####COPYRIGHTBEGIN####
//                                                                          
// -------------------------------------------                              
// The contents of this file are subject to the Red Hat eCos Public License 
// Version 1.1 (the "License"); you may not use this file except in         
// compliance with the License.  You may obtain a copy of the License at    
// http://www.redhat.com/                                                   
//                                                                          
// Software distributed under the License is distributed on an "AS IS"      
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the 
// License for the specific language governing rights and limitations under 
// the License.                                                             
//                                                                          
// The Original Code is eCos - Embedded Configurable Operating System,      
// released September 30, 1998.                                             
//                                                                          
// The Initial Developer of the Original Code is Red Hat.                   
// Portions created by Red Hat are                                          
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.                             
// All Rights Reserved.                                                     
// -------------------------------------------                              
//                                                                          
//####COPYRIGHTEND####
//===========================================================================
