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

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

?? stream.inl

?? ecos實時嵌入式操作系統
?? INL
字號:
#ifndef CYGONCE_LIBC_STDIO_STREAM_INL#define CYGONCE_LIBC_STDIO_STREAM_INL//========================================================================////      stream.inl////      Inline functions for internal C library stdio stream interface////========================================================================//####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:          2000-04-19// Purpose:     // Description: // Usage:         Do not include this file -//                #include <cyg/libc/stdio/stream.hxx> instead.////####DESCRIPTIONEND####////========================================================================// CONFIGURATION#include <pkgconf/libc_stdio.h>    // Configuration header// INCLUDES#include <cyg/infra/cyg_type.h>    // Common project-wide type definitions#include <stddef.h>                // NULL and size_t from compiler#include <errno.h>                 // Error codes#include <cyg/libc/stdio/stream.hxx> // Just be sure that this really is                                   // included#include <cyg/libc/stdio/io.inl>     // I/O system inlines// FUNCTIONS#ifdef CYGDBG_USE_ASSERTSinline cyg_boolCyg_StdioStream::check_this( cyg_assert_class_zeal zeal ) const{    // check that it has the magic word set meaning it is valid.    if ( magic_validity_word != 0x7b4321ce )        return false;    return true;} // check_this()#endif // ifdef CYGDBG_USE_ASSERTS// LOCKING FUNCTIONS// returns true on successinline cyg_boolCyg_StdioStream::lock_me( void ){    CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );    #ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS    return stream_lock.lock();#else    // otherwise it "worked"    return true;#endif    } // lock_me()// returns true on successinline cyg_boolCyg_StdioStream::trylock_me( void ){    CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );    #ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS    return stream_lock.trylock();#else    // otherwise it "worked"    return true;#endif    } // lock_me()inline voidCyg_StdioStream::unlock_me( void ){    CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );    #ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS    stream_lock.unlock();#endif} // unlock_me()// DESTRUCTORinline Cyg_ErrNoCyg_StdioStream::close(){    Cyg_ErrNo err = ENOERR;        if (!lock_me())        return EBADF;    if( my_device != CYG_STDIO_HANDLE_NULL )    {        flush_output_unlocked();        err = cyg_stdio_close( my_device );            if( err == ENOERR )            my_device = CYG_STDIO_HANDLE_NULL;    }        unlock_me();        return err;} // close()inlineCyg_StdioStream::~Cyg_StdioStream(){    CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );    // Close the device if it has not already been closed.    if( my_device != CYG_STDIO_HANDLE_NULL )        close();    #ifdef CYGDBG_USE_ASSERTS    magic_validity_word = 0xbadbad;#endif} // Cyg_StdioStream destructor// MEMBER FUNCTIONS// this is currently just a wrapper around write, but having this interface// leaves scope for optimisations in futureinline Cyg_ErrNoCyg_StdioStream::write_byte( cyg_uint8 c ){    cyg_ucount32 dummy_bytes_written;    Cyg_ErrNo err;    CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );        err = write( &c, 1, &dummy_bytes_written );    CYG_ASSERT( (err!=ENOERR) || (dummy_bytes_written==1),                "Single byte not written, but no error returned!" );    return err;} // write_byte()inline Cyg_ErrNoCyg_StdioStream::unread_byte( cyg_uint8 c ){    CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );    #ifdef CYGFUN_LIBC_STDIO_ungetc    if (!lock_me())        return EBADF;  // assume file is now invalid    if (flags.unread_char_buf_in_use) {        unlock_me();        return ENOMEM;    } // if    flags.unread_char_buf_in_use = true;    unread_char_buf = c;    // can't be at EOF any more    flags.at_eof = false;    if (position)    // position is always 0 for certain devices        --position;        unlock_me();    return ENOERR;#else // ifdef CYGFUN_LIBC_STDIO_ungetc    return ENOSYS;#endif // ifdef CYGFUN_LIBC_STDIO_ungetc} // unread_byte()inline cyg_ucount32Cyg_StdioStream::bytes_available_to_read( void ){    cyg_ucount32 bytes=0;    CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );    #ifdef CYGFUN_LIBC_STDIO_ungetc    if (flags.unread_char_buf_in_use)        ++bytes;#endif #ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO    // either the last operation was a read, which attempted to read bytes    // into the buffer, or there are no bytes in the buffer    if (flags.buffering) {        if (flags.last_buffer_op_was_read == true)            bytes += io_buf.get_buffer_space_used();    }    else#endif    if (flags.readbuf_char_in_use)        ++bytes;    return bytes;} // bytes_available_to_read()inline Cyg_ErrNoCyg_StdioStream::flush_output( void ){    Cyg_ErrNo err;    CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );        if (!lock_me())        return EBADF;  // assume file is now invalid        err = flush_output_unlocked();    unlock_me();      return err;} // flush_output()// get error status for this fileinline Cyg_ErrNoCyg_StdioStream::get_error( void ){    Cyg_ErrNo err_temp;        CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );        if (!lock_me())        return EBADF;     // well, we've certainly got an error now!        err_temp = error;    unlock_me();    return err_temp;} // get_error()// set error status for this fileinline voidCyg_StdioStream::set_error( Cyg_ErrNo errno_to_set ){    CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );        if (!lock_me())    {        errno = EBADF; // best we can do - we can't trust error to be there        return;    } // if        errno = error = errno_to_set;    if ( EEOF == error )        flags.at_eof = 1;    unlock_me();} // set_error()// are we at EOF? true means we are, false means noinline cyg_boolCyg_StdioStream::get_eof_state( void ){    cyg_bool eof_temp;    CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );        if (!lock_me())        return false;     // not much we can do here        eof_temp = flags.at_eof;    unlock_me();        return eof_temp;} // get_eof_state()// Set whether we are at EOF.inline voidCyg_StdioStream::set_eof_state( cyg_bool eof_to_set ){    CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );        if (!lock_me())        return;     // not much we can do here        flags.at_eof = eof_to_set;    unlock_me();} // set_eof_state()// retrieve positioninline Cyg_ErrNoCyg_StdioStream::get_position( fpos_t *pos ){    CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );        if (!lock_me())        return EBADF; // assume file is now invalid    *pos = position;    unlock_me();    return ENOERR;} // get_position()// set absolute positioninline Cyg_ErrNoCyg_StdioStream::set_position( fpos_t pos, int whence ){    CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );    #ifndef CYGPKG_LIBC_STDIO_FILEIO        // this is currently a workaround until we have real files    // this will be corrected when we decide the true filesystem interface    Cyg_ErrNo err;    cyg_uint8 c;    if ((whence != SEEK_CUR) || pos < 0)        return ENOSYS;    if (!lock_me())        return EBADF; // assume file is now invalid    // Drain read buffer        for ( ; pos > 0 ; pos-- ) {        err = read_byte( &c );        if (err == EAGAIN)            err=refill_read_buffer();        // if read_byte retured error, or refill_read_buffer returned error        if (err) {            unlock_me();            return err;        } // if    } // for    unlock_me();    return ENOERR;    #else    if (!lock_me())        return EBADF; // assume file is now invalid    if ( whence != SEEK_END ) {        off_t bytesavail = (off_t)bytes_available_to_read();        off_t abspos = (whence == SEEK_CUR) ? position + pos : pos;        off_t posdiff = abspos - position;        if ( posdiff >= 0 && bytesavail > posdiff ) {            // can just "seek" within the existing buffer#ifdef CYGFUN_LIBC_STDIO_ungetc            if (posdiff>0 && flags.unread_char_buf_in_use) {                flags.unread_char_buf_in_use = false;                posdiff--;            }#endif#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO            if (posdiff>0 && flags.buffering) {                io_buf.set_bytes_read(posdiff);                posdiff=0;            } else #endif            if (posdiff>0 && flags.readbuf_char_in_use) {                flags.readbuf_char_in_use = false;                posdiff--;            }            CYG_ASSERT(posdiff==0, "Failed to seek within buffer correctly");            position = abspos;            unlock_me();            return ENOERR;        } // endif (bytesavail > posdiff)        if (whence == SEEK_CUR) {            position += bytesavail;        }    } //endif (whence != SEEK_END)    Cyg_ErrNo err;    off_t newpos=pos;    err = cyg_stdio_lseek( my_device, &newpos, whence );    if( err == ENOERR )    {        // Clean out the buffer. Flush output if any present,        // and clear any input out of input buffer and any ungot        // chars from unread buffer.            err = flush_output_unlocked();        io_buf.drain_buffer();#ifdef CYGFUN_LIBC_STDIO_ungetc        flags.unread_char_buf_in_use = false;#endif        // Clear EOF indicator.        flags.at_eof = false;                // update stream pos        position = newpos;    }        unlock_me();    return err;#endif        } // set_position()#endif // CYGONCE_LIBC_STDIO_STREAM_INL multiple inclusion protection// EOF stream.inl

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国模娜娜一区二区三区| 久久伊人蜜桃av一区二区| 国产女人18毛片水真多成人如厕| 亚洲国产日韩精品| 成人av在线资源| 337p粉嫩大胆色噜噜噜噜亚洲| 视频一区在线播放| av电影天堂一区二区在线观看| 日韩午夜av一区| 免播放器亚洲一区| 91精品国产欧美一区二区18| 久久成人免费电影| 欧美色手机在线观看| 中文av一区二区| 丁香亚洲综合激情啪啪综合| 久久综合狠狠综合久久综合88| 日本伊人精品一区二区三区观看方式 | 国产不卡在线一区| 久久久美女毛片| 国产乱人伦偷精品视频免下载| 2欧美一区二区三区在线观看视频| 日韩精品视频网站| 久久嫩草精品久久久精品| av网站免费线看精品| 午夜在线成人av| 精品国产污污免费网站入口| 国产激情91久久精品导航| 久久久精品国产免费观看同学| 国产福利电影一区二区三区| 亚洲精品va在线观看| 欧美日本视频在线| 狠狠色丁香久久婷婷综| 国产精品国产三级国产普通话三级| 91在线你懂得| 99久久er热在这里只有精品66| 亚洲精品第1页| 精品国精品国产| 精品视频在线视频| 国产一区二区不卡在线 | 精品国产一区二区三区久久久蜜月 | 国产在线国偷精品产拍免费yy| 成人免费在线视频| 亚洲午夜在线观看视频在线| 欧美精品一区二区久久久| 一本到三区不卡视频| 懂色av中文字幕一区二区三区| 亚洲影视资源网| 国产精品久久久久久久久图文区| 777奇米四色成人影色区| 99久久久久久99| 99麻豆久久久国产精品免费优播| 日本91福利区| 亚洲国产精品久久一线不卡| 国产精品伦理在线| 久久久亚洲精品一区二区三区 | 国内久久婷婷综合| 精品一区二区久久| 国产精品中文字幕欧美| 久久99热这里只有精品| 视频一区二区三区入口| 亚洲国产毛片aaaaa无费看| 日韩一区欧美小说| 成人免费在线播放视频| 亚洲欧美色一区| 视频在线观看一区| 日韩国产一区二| 国内外成人在线视频| 韩国视频一区二区| 国产一区二区福利| 99久久久免费精品国产一区二区| 成人av先锋影音| 精品视频一区二区不卡| 911精品产国品一二三产区| 在线观看91av| 国产日韩欧美高清| 一区二区三区在线免费观看| 亚洲成人动漫av| 国产综合色视频| 一本久久精品一区二区| 欧美一级免费观看| 国产精品乱码一区二区三区软件 | 91视频你懂的| 精品日韩一区二区三区| 亚洲精品一区二区三区在线观看| 国产精品久久久久一区二区三区共| 亚洲精品高清在线| 成人a级免费电影| 日韩视频在线永久播放| 国产精品国产精品国产专区不蜜 | 国产午夜精品在线观看| 亚洲电影一区二区三区| 国产ts人妖一区二区| 欧美日本视频在线| 亚洲色图在线看| 福利电影一区二区三区| 久久蜜桃av一区精品变态类天堂| 18欧美亚洲精品| 福利视频网站一区二区三区| 日韩一级大片在线观看| 亚洲一区二区三区四区的| 国产激情视频一区二区在线观看 | 中文字幕不卡三区| 国产精品一区二区91| 日韩一区二区三区高清免费看看| 亚洲精品视频在线观看网站| 99这里只有久久精品视频| 欧美国产日韩a欧美在线观看| 日本特黄久久久高潮| 欧美日韩电影在线| 午夜国产不卡在线观看视频| 不卡一卡二卡三乱码免费网站| 国产精品欧美久久久久一区二区| 韩国av一区二区| 国产精品人妖ts系列视频| 国产成人在线免费观看| 国产日产欧产精品推荐色| 亚洲国产日韩在线一区模特| 国产传媒欧美日韩成人| 国产欧美一区二区在线观看| 波多野洁衣一区| 亚洲一级二级在线| 欧美一区日韩一区| 成人在线综合网站| 夜夜揉揉日日人人青青一国产精品| 日本精品视频一区二区| 日韩成人一级片| 国产精品福利一区| 欧美一级淫片007| 91亚洲男人天堂| 免费人成在线不卡| 国产精品视频一二三区| 欧美日韩一区二区不卡| 福利电影一区二区| 日本特黄久久久高潮| 亚洲日本青草视频在线怡红院| 久久久久亚洲蜜桃| 国产成人av一区| 综合精品久久久| 8v天堂国产在线一区二区| 老色鬼精品视频在线观看播放| 亚洲视频综合在线| 欧美经典一区二区| 国产在线视视频有精品| 亚洲午夜在线观看视频在线| 欧美激情在线免费观看| 26uuu精品一区二区在线观看| 91福利社在线观看| 色综合久久中文综合久久牛| www.亚洲精品| 成人污视频在线观看| 国产一区二区伦理片| 精品综合久久久久久8888| 久久精品一区二区三区四区| 精品欧美一区二区久久| 日韩精品一区二区三区蜜臀| 欧美精品色综合| 欧美肥胖老妇做爰| 日韩欧美第一区| 久久久久国产精品厨房| www激情久久| 日韩欧美国产wwwww| 久久久九九九九| 久久精品亚洲麻豆av一区二区| 日韩一区二区免费高清| 久久夜色精品国产噜噜av| 日本一区二区视频在线观看| 国产亚洲综合在线| 亚洲一区二区精品久久av| 午夜精品久久久久久| 久久99精品久久久久久国产越南| 久国产精品韩国三级视频| 成人禁用看黄a在线| 国产成人高清在线| 在线精品亚洲一区二区不卡| 欧美精品一二三| 国产网站一区二区三区| 亚洲人成网站影音先锋播放| 视频一区中文字幕| 99视频精品全部免费在线| 91麻豆精品在线观看| 欧美一区二区三区免费在线看 | 国产日韩精品一区二区三区| 日韩有码一区二区三区| 成人免费视频caoporn| 色乱码一区二区三区88| 欧美日韩亚洲丝袜制服| 中文乱码免费一区二区 | 国产亚洲欧美激情| 蜜臀av性久久久久蜜臀av麻豆| 成人性生交大片免费| 久久久91精品国产一区二区精品 | 亚洲免费在线视频| 99视频热这里只有精品免费| 国产亚洲精品免费| 免费观看成人av| 欧美精品在线一区二区| 亚洲一区二区三区四区五区黄| 99久久伊人网影院| 亚洲国产精品精华液ab| 精品一区二区三区免费|