/*

args_4: Command line arguments parsing library
Yauheni A. Akhotnikau (C) 2002-2003
eao197@yahoo.com
-------------------------------------------------

Permission is granted to anyone to use this software for any purpose on any
computer system, and to redistribute it freely, subject to the following
restrictions:

1. This software 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.

2. The origin of this software must not be misrepresented, either by
   explicit claim or by omission.

3. Altered versions must be plainly marked as such, and must not be
   misrepresented as being the original software.

-------------------------------------------------

*/
/*
	Args-4
*/

#include <cassert>

#include <args_4/h/args_stdio.hpp>

namespace args_4
{

/*
** stdio_error_stream_t
*/
stdio_error_stream_t::stdio_error_stream_t()
	:
		m_stream( stdout )
{
}

stdio_error_stream_t::stdio_error_stream_t(
	FILE * stream )
	:
		m_stream( stream )
{
	assert( m_stream );
}

stdio_error_stream_t::~stdio_error_stream_t()
{
}

error_stream_t &
stdio_error_stream_t::out( const char * str ) {
	if( m_stream ) {
		fprintf( m_stream, "%s", ( str ? str : "NULL" ) );
	}

	return *this;
}

} /* namespace args_4 */

