亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? stream.hxx

?? ecos下的gui開發源代碼
?? HXX
字號:
#ifndef CYGONCE_LIBC_STDIO_STREAM_HXX
#define CYGONCE_LIBC_STDIO_STREAM_HXX
//========================================================================
//
//      stream.hxx
//
//      Internal C library stdio stream interface definitions
//
//========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
//
// eCos is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 or (at your option) any later version.
//
// eCos 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.  See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License along
// with eCos; if not, write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
//
// As a special exception, if other files instantiate templates or use macros
// or inline functions from this file, or you compile this file and link it
// with other works to produce a work based on this file, this file does not
// by itself cause the resulting work to be covered by the GNU General Public
// License. However the source code for this file must still be made available
// in accordance with section (3) of the GNU General Public License.
//
// This exception does not invalidate any other reasons why a work based on
// this file might be covered by the GNU General Public License.
//
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
// at http://sources.redhat.com/ecos/ecos-license/
// -------------------------------------------
//####ECOSGPLCOPYRIGHTEND####
//========================================================================
//#####DESCRIPTIONBEGIN####
//
// Author(s):     jlarmour
// Contributors:  
// Date:          2001-03-16
// Purpose:     
// Description: 
// Usage:         #include <cyg/libc/stdio/stream.hxx>
//
//####DESCRIPTIONEND####
//
//========================================================================

// CONFIGURATION

#include <pkgconf/libc_stdio.h>   // Configuration header

// INCLUDES

#include <cyg/infra/cyg_type.h>    // Common project-wide type definitions
#include <cyg/infra/cyg_ass.h>     // Get assertion macros, as appropriate
#include <errno.h>                 // Cyg_ErrNo
#include <stdio.h>                 // fpos_t and IOBUF defines
#include <cyg/libc/stdio/io.hxx>     // Physical IO support
#include <cyg/libc/stdio/streambuf.hxx>  // Stdio stream file buffers

#ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
#include <pkgconf/kernel.h>
#include <cyg/kernel/mutex.hxx>    // Cyg_Mutex
#endif

// TYPE DEFINITIONS

class Cyg_StdioStream;
__externC Cyg_ErrNo
cyg_libc_stdio_flush_all_but( Cyg_StdioStream * );

class Cyg_StdioStream
{
    friend int setvbuf( FILE *, char *, int, size_t ) __THROW;
    friend Cyg_ErrNo
    cyg_libc_stdio_flush_all_but( Cyg_StdioStream * );

private:

    // error status for this file
    Cyg_ErrNo error;


    cyg_stdio_handle_t my_device;

#ifdef CYGFUN_LIBC_STDIO_ungetc
    cyg_uint8 unread_char_buf;
#endif

#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
    Cyg_StdioStreamBuffer io_buf; // read/write buffer
#endif
    cyg_uint8 readbuf_char; // a one character emergency "buffer"
                            // only used when configured to not buffer
                            // (i.e. !CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO)
                            // or set at runtime to not buffer (i.e.
                            // buffering mode is _IONBF)

    // some flags indicating the state of the file. Some of it is internal
    // state, which should not be public. Use bitfields to save
    // space, which means using "unsigned int" rather than cyg_uintX
    struct {
        unsigned int at_eof                  : 1; // Have we reached eof?

        unsigned int opened_for_read         : 1; // opened_for_read and

        unsigned int opened_for_write        : 1; // opened_for_write can
                                                  // be set simultaneously

        unsigned int binary                  : 1; // opened for binary or
                                                  // text mode?
        
#ifdef CYGFUN_LIBC_STDIO_ungetc
        unsigned int unread_char_buf_in_use  : 1; // unget buf in use?
#endif

#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
        unsigned int buffering               : 1; // Is this file buffered?

        unsigned int line_buffering          : 1; // If so, is it line
                                                  // buffered? If it is
                                                  // buffered, but NOT line
                                                  // buffered, it must be
                                                  // fully buffered

        unsigned int last_buffer_op_was_read : 1; // did we last read from
                                                  // the buffer. If not we
                                                  // must have written
#endif
        unsigned int readbuf_char_in_use     : 1; // is the above
                                                  // readbuf_char in use?
        
    } flags;

    // current position for reading/writing
    fpos_t position;

#ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
    Cyg_Mutex stream_lock;  // used for locking this stream
#endif // ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS

#ifdef CYGDBG_USE_ASSERTS
    // a value to check that this class is hopefully valid
    cyg_ucount32 magic_validity_word;
#endif

public:
    // different modes when constructing (i.e. opening).
    typedef enum {
        CYG_STREAM_READ,
        CYG_STREAM_WRITE,
        CYG_STREAM_READWRITE_NOCREATE,
        CYG_STREAM_READWRITE_CREATE
    } OpenMode;

    // CONSTRUCTORS

    // This constructs the stream - effectively opens the file. This is
    // used for static initialisation, and actually calls construct below
    //
    // dev is a valid Cyg_Device_Table_t, although it does not have to
    // be a member of the device table object itself
    //
    // open_mode is one of CYG_STREAM_READ, CYG_STREAM_WRITE,
    // CYG_STREAM_READWRITE_NOCREATE or CYG_STREAM_READWRITE_CREATE
    //
    // append is true if the file position should be set at EOF on opening
    //
    // binary is true if this is a binary stream. Otherwise it is a text
    // stream and character conversions (especially newline) may occur
    //
    // buffer_mode is one of _IONBF, _IOLBF, _IOFBF (from <stdio.h>)
    // If buffer_mode is _IONBF, buffer_size should still be set to 0
    // and buffer_addr to NULL. If buffering is not configured, none
    // of buffer_mode, buffer_size and buffer_addr have any effect
    //
    // buffer_size is the size of buffer to use
    //
    // buffer_addr is the address of a user supplied buffer. By default
    // (when NULL) a system one is provided.
    //
    // The "return code" is set by assignment to the error member of this
    // stream - use the get_error() method to check

    Cyg_StdioStream( cyg_stdio_handle_t dev, OpenMode open_mode,
                     cyg_bool append, cyg_bool binary, int buffer_mode,
                     cyg_ucount32 buffer_size=BUFSIZ,
                     cyg_uint8 *buffer_addr=NULL );

    Cyg_StdioStream( OpenMode open_mode, 
                     cyg_ucount32 buffer_size=BUFSIZ,
                     cyg_uint8 *buffer_addr=NULL );

private:    
    void initialize( cyg_stdio_handle_t dev, OpenMode open_mode,
                     cyg_bool append, cyg_bool binary, int buffer_mode,
                     cyg_ucount32 buffer_size=BUFSIZ,
                     cyg_uint8 *buffer_addr=NULL );
public:
    
    // DESTRUCTOR

    ~Cyg_StdioStream();


    // MEMBER FUNCTIONS

    // Close the stream. This should be called before the destructor,
    // so we can see and report any errors produced.
    Cyg_ErrNo close();

    // Refill read buffer from the stream - note this blocks until
    // something arrives on the stream
    Cyg_ErrNo
    refill_read_buffer( void );


    // Read not more than buffer_length bytes from the read buffer into the
    // user buffer.
    // The number of bytes put into the user buffer is written
    // into *bytes_read
    Cyg_ErrNo
    read( cyg_uint8 *user_buffer, cyg_ucount32 buffer_length,
          cyg_ucount32 *bytes_read );


    // Read a single byte from the stream. Returns EAGAIN if no character
    // available or EEOF if end of file (as well as setting the EOF state)
    Cyg_ErrNo
    read_byte( cyg_uint8 *c );

    // Read a single byte from the stream, but don't remove it. Returns
    // EAGAIN if no character available or EEOF if end of file (as well
    // as setting the EOF state)
    Cyg_ErrNo
    peek_byte( cyg_uint8 *c );


    // Return a byte into the stream - basically the same as ungetc()
    Cyg_ErrNo
    unread_byte( cyg_uint8 c );

    // the number of bytes available to read without needing to refill the
    // buffer
    cyg_ucount32
    bytes_available_to_read( void );

    Cyg_ErrNo
    write( const cyg_uint8 *buffer, cyg_ucount32 buffer_length,
           cyg_ucount32 *bytes_written );

    Cyg_ErrNo
    write_byte( cyg_uint8 c );


    Cyg_ErrNo
    flush_output( void );

    Cyg_ErrNo
    flush_output_unlocked( void );

    // prevent multiple access in thread safe mode

    // lock_me() returns false if it couldn't be locked, which could
    // happen if the file descriptor is bad

    cyg_bool
    lock_me( void );

    // trylock_me() returns false if it couldn't be locked, probably
    // because it is already locked
    cyg_bool
    trylock_me( void );

    void
    unlock_me( void );

    // get error status for this file 
    Cyg_ErrNo
    get_error( void );

    // set error status for this file.
    void
    set_error( Cyg_ErrNo errno_to_set );

    // are we at EOF? true means we are, false means no
    cyg_bool
    get_eof_state( void );

    // Set whether we are at EOF.
    void
    set_eof_state( cyg_bool eof_to_set );

    // retrieve position
    Cyg_ErrNo
    get_position( fpos_t *pos );

    // set absolute position. whence is SEEK_SET, SEEK_CUR, or SEEK_END
    Cyg_ErrNo
    set_position( fpos_t pos, int whence );

    // Return my_device
    cyg_stdio_handle_t get_dev() { return my_device; };
    
    CYGDBG_DEFINE_CHECK_THIS
};

// INLINE FUNCTIONS

#include <cyg/libc/stdio/stream.inl>

#endif // CYGONCE_LIBC_STDIO_STREAM_HXX multiple inclusion protection

// EOF stream.hxx

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本免费新一区视频| 在线观看欧美日本| 26uuu国产电影一区二区| 青娱乐精品视频在线| 欧美亚一区二区| 亚洲国产成人tv| 欧美日韩成人高清| 亚洲成人免费视频| 欧美另类变人与禽xxxxx| 午夜精品久久久久久久久久| 在线综合视频播放| 国产乱子轮精品视频| 久久婷婷色综合| 波多野洁衣一区| 亚洲一区二区免费视频| 亚洲男人电影天堂| 欧美视频你懂的| 精品午夜久久福利影院| 国产精品久久毛片av大全日韩| 91欧美一区二区| 亚洲成a人v欧美综合天堂下载| 3d成人h动漫网站入口| 精品一区二区三区视频 | 91黄色免费观看| 蜜桃一区二区三区四区| 久久久久久久国产精品影院| 91老司机福利 在线| 日韩精品色哟哟| 国产精品福利电影一区二区三区四区| 欧美专区在线观看一区| 免费精品视频在线| 国产精品卡一卡二| 欧美精品日韩精品| 粗大黑人巨茎大战欧美成人| 亚洲高清免费观看| 久久久久久久久一| 色8久久精品久久久久久蜜| 美日韩一区二区| 尤物在线观看一区| 精品久久久影院| 欧美伊人久久大香线蕉综合69| 精品伊人久久久久7777人| 亚洲欧美怡红院| 精品人在线二区三区| 99综合电影在线视频| 美女一区二区视频| 一区二区在线观看视频在线观看| 久久理论电影网| 69堂亚洲精品首页| 日本高清视频一区二区| 国产一区二区三区黄视频 | 中文字幕一区二区三区在线观看| 欧美一区二区性放荡片| 91视频.com| 高清国产午夜精品久久久久久| 日韩av网站免费在线| 亚洲免费高清视频在线| 国产亚洲欧美色| 久久亚洲二区三区| 日韩免费性生活视频播放| 欧美理论在线播放| 国产精品女上位| 欧美区在线观看| 欧美性感一区二区三区| 亚洲人xxxx| 国产人成一区二区三区影院| 91精品国产日韩91久久久久久| 欧美午夜片在线观看| 成人app下载| 99这里都是精品| 成人免费毛片a| 国产成人日日夜夜| 国内精品在线播放| 经典三级视频一区| 国产一区二区精品久久99| 日本中文在线一区| 免费精品视频在线| 久久丁香综合五月国产三级网站| 日韩av网站免费在线| 免费一区二区视频| 久久电影网电视剧免费观看| 精品中文字幕一区二区| 紧缚奴在线一区二区三区| 毛片基地黄久久久久久天堂| 蜜臀av性久久久久蜜臀av麻豆| 免费人成精品欧美精品 | 精品国产乱码久久久久久夜甘婷婷| 欧美精品一卡两卡| 欧美精品免费视频| 欧美一区二区视频网站| 日韩欧美一级片| 久久精品日韩一区二区三区| 久久嫩草精品久久久精品| www一区二区| 亚洲天堂免费在线观看视频| 亚洲人成在线观看一区二区| 亚洲另类色综合网站| 亚洲一区二区三区在线看| 午夜精品一区二区三区三上悠亚 | 91精品国产福利| 精品少妇一区二区三区| 欧美大胆一级视频| 国产亚洲一区二区三区| 国产精品国产三级国产aⅴ入口| 亚洲色图视频网站| 亚洲h在线观看| 国内精品久久久久影院一蜜桃| 风流少妇一区二区| 色婷婷久久99综合精品jk白丝| 欧美疯狂性受xxxxx喷水图片| 欧美岛国在线观看| 中文字幕在线不卡一区| 亚洲小少妇裸体bbw| 久久国产精品99精品国产| 国产a久久麻豆| 欧美天堂亚洲电影院在线播放 | 久久久久97国产精华液好用吗| 国产欧美一区二区精品性| 亚洲欧洲精品天堂一级| 午夜电影网一区| 成人午夜私人影院| 欧美午夜在线一二页| 久久久久久久国产精品影院| 亚洲制服丝袜在线| 国产精品一区免费视频| 一本色道久久综合亚洲精品按摩| 日韩欧美一级特黄在线播放| 最新国产精品久久精品| 精品系列免费在线观看| 欧美亚洲自拍偷拍| 国产三级欧美三级日产三级99 | 亚洲色欲色欲www| 极品少妇xxxx偷拍精品少妇| 97久久精品人人澡人人爽| 欧美一区二区三区在线电影| 日韩毛片在线免费观看| 极品瑜伽女神91| 91精品在线麻豆| 亚洲美女一区二区三区| 国产一区激情在线| 欧美一区二区三区成人| 亚洲欧美激情小说另类| 国产精品1区2区3区在线观看| 欧美日韩国产一级二级| 亚洲欧美韩国综合色| 国产一区二区免费视频| 日韩欧美一区电影| 婷婷夜色潮精品综合在线| 91小视频在线免费看| 久久久久久久国产精品影院| 蜜臀91精品一区二区三区| 欧美色倩网站大全免费| 国产精品久久久久久久久搜平片 | 欧美吞精做爰啪啪高潮| 国产精品美日韩| 国产麻豆一精品一av一免费 | 国产sm精品调教视频网站| 欧美一级在线观看| 亚洲一卡二卡三卡四卡| 99热国产精品| 综合av第一页| 97久久精品人人做人人爽50路| 国产精品嫩草影院av蜜臀| 国产精品一线二线三线精华| 337p日本欧洲亚洲大胆色噜噜| 久久精品国产亚洲aⅴ| 欧美一卡在线观看| 另类中文字幕网| 久久综合色8888| 国产在线国偷精品免费看| 日韩美女在线视频 | 一区二区三区美女视频| 不卡的av网站| 一区二区三区中文字幕精品精品| 91欧美激情一区二区三区成人| 亚洲蜜桃精久久久久久久| 99国产精品一区| 一区二区三区高清| 欧美在线观看视频一区二区三区| 亚洲一区二区三区在线| 欧美日韩在线不卡| 日韩在线一区二区| 欧美一级在线视频| 国产在线不卡一区| 中文字幕欧美激情| 色综合天天狠狠| 爽好多水快深点欧美视频| 欧美一区二区三区不卡| 国内外精品视频| 亚洲青青青在线视频| 欧美日韩在线不卡| 久久99精品国产麻豆婷婷| 久久久激情视频| 在线视频一区二区免费| 亚洲成人动漫精品| 精品国产自在久精品国产| 成人午夜免费电影| 亚洲资源中文字幕| 欧美v国产在线一区二区三区| 成人短视频下载|