Artifact a177a89d97b5a4925bdd382de2dbe07deacc7861fad1d9021d2d1e11b9a59851:
- File
src/OFStdIOStream.h
— part of check-in
[085bfc12a0]
at
2013-04-27 01:26:35
on branch trunk
— Add OFStdIOStream.
This is used for of_std{in,out,err} now instead of OFFile. (user: js, size: 1170) [annotate] [blame] [check-ins using]
/* * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFStream.h" /*! * @brief A class for providing standard input, output and error as OFStream. */ @interface OFStdIOStream: OFStream { int _fd; bool _atEndOfStream; } - OF_initWithFileDescriptor: (int)fd; @end #ifdef __cplusplus extern "C" { #endif /*! @file */ /*! * @brief The standard input as an OFStream. */ extern OFStdIOStream *of_stdin; /*! * @brief The standard output as an OFStream. */ extern OFStdIOStream *of_stdout; /*! * @brief The standard error as an OFStream. */ extern OFStdIOStream *of_stderr; extern void of_log(OFConstantString*, ...); #ifdef __cplusplus } #endif