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

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

?? fread.c

?? C標準庫源代碼,能提高對C的理解,不錯的哦
?? C
字號:
/***
*fread.c - read from a stream
*
*       Copyright (c) 1989-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
*       Read from the specified stream into the user's buffer.
*
*******************************************************************************/

#include <cruntime.h>
#include <stdio.h>
#include <mtdll.h>
#include <io.h>
#include <string.h>
#include <file2.h>

/***
*size_t fread(void *buffer, size_t size, size_t count, FILE *stream) -
*       read from specified stream into the specified buffer.
*
*Purpose:
*       Read 'count' items of size 'size' from the specified stream into
*       the specified buffer. Return when 'count' items have been read in
*       or no more items can be read from the stream.
*
*Entry:
*       buffer  - pointer to user's buffer
*       size    - size of the item to read in
*       count   - number of items to read
*       stream  - stream to read from
*
*Exit:
*       Returns the number of (whole) items that were read into the buffer.
*       This may be less than 'count' if an error or eof occurred. In this
*       case, ferror() or feof() should be used to distinguish between the
*       two conditions.
*
*Notes:
*       fread will attempt to buffer the stream (side effect of the _filbuf
*       call) if necessary.
*
*       No more than 0xFFFE bytes may be read in at a time by a call to
*       read(). Further, read() does not handle huge buffers. Therefore,
*       in large data models, the read request is broken down into chunks
*       that do not violate these considerations. Each of these chunks is
*       processed much like an fread() call in a small data model (by a
*       call to _nfread()).
*
*       MTHREAD/DLL - Handled in three layers. fread() handles the locking
*       and DS saving/loading/restoring (if required) and calls _fread_lk()
*       to do the work. _fread_lk() is the same as the single-thread,
*       large data model version of fread(). It breaks up the read request
*       into digestible chunks and calls _nfread() to do the actual work.
*
*       386/MTHREAD/DLL - Handled in just the two layers since it is small
*       data model. The outer layer, fread(), takes care of the stream locking
*       and calls _fread_lk() to do the actual work. _fread_lk() is the same
*       as the single-thread version of fread().
*
*******************************************************************************/


#ifdef _MT
/* define locking/unlocking version */
size_t __cdecl fread (
        void *buffer,
        size_t size,
        size_t count,
        FILE *stream
        )
{
        size_t retval;

        _lock_str(stream);                                /* lock stream */
        retval = _fread_lk(buffer, size, count, stream);  /* do the read */
        _unlock_str(stream);                              /* unlock stream */
        return retval;
}
#endif  /* _MT */

/* define the normal version */
#ifdef _MT
size_t __cdecl _fread_lk (
#else  /* _MT */
size_t __cdecl fread (
#endif  /* _MT */
        void *buffer,
        size_t size,
        size_t num,
        FILE *stream
        )
{
        char *data;                     /* point to where should be read next */
        unsigned total;                 /* total bytes to read */
        unsigned count;                 /* num bytes left to read */
        unsigned bufsize;               /* size of stream buffer */
        unsigned nbytes;                /* how much to read now */
        unsigned nread;                 /* how much we did read */
        int c;                          /* a temp char */

        /* initialize local vars */
        data = buffer;

        if ( (count = total = size * num) == 0 )
                return 0;

        if (anybuf(stream))
                /* already has buffer, use its size */
                bufsize = stream->_bufsiz;
        else
#if defined (_M_M68K) || defined (_M_MPPC)
                /* assume will get BUFSIZ buffer */
                bufsize = BUFSIZ;
#else  /* defined (_M_M68K) || defined (_M_MPPC) */
                /* assume will get _INTERNAL_BUFSIZ buffer */
                bufsize = _INTERNAL_BUFSIZ;
#endif  /* defined (_M_M68K) || defined (_M_MPPC) */

        /* here is the main loop -- we go through here until we're done */
        while (count != 0) {
                /* if the buffer exists and has characters, copy them to user
                   buffer */
                if (anybuf(stream) && stream->_cnt != 0) {
                        /* how much do we want? */
                        nbytes = (count < (unsigned)stream->_cnt) ? count : stream->_cnt;
                        memcpy(data, stream->_ptr, nbytes);

                        /* update stream and amt of data read */
                        count -= nbytes;
                        stream->_cnt -= nbytes;
                        stream->_ptr += nbytes;
                        data += nbytes;
                }
                else if (count >= bufsize) {
                        /* If we have more than bufsize chars to read, get data
                           by calling read with an integral number of bufsiz
                           blocks.  Note that if the stream is text mode, read
                           will return less chars than we ordered. */

                        /* calc chars to read -- (count/bufsize) * bufsize */
                        nbytes = ( bufsize ? (count - count % bufsize) :
                                   count );

                        nread = _read(_fileno(stream), data, nbytes);
                        if (nread == 0) {
                                /* end of file -- out of here */
                                stream->_flag |= _IOEOF;
                                return (total - count) / size;
                        }
                        else if (nread == (unsigned)-1) {
                                /* error -- out of here */
                                stream->_flag |= _IOERR;
                                return (total - count) / size;
                        }

                        /* update count and data to reflect read */
                        count -= nread;
                        data += nread;
                }
                else {
                        /* less than bufsize chars to read, so call _filbuf to
                           fill buffer */
                        if ((c = _filbuf(stream)) == EOF) {
                                /* error or eof, stream flags set by _filbuf */
                                return (total - count) / size;
                        }

                        /* _filbuf returned a char -- store it */
                        *data++ = (char) c;
                        --count;

                        /* update buffer size */
                        bufsize = stream->_bufsiz;
                }
        }

        /* we finished successfully, so just return num */
        return num;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青国产91久久久久久| 美女看a上一区| 国产日韩欧美麻豆| 日韩精品中午字幕| 久久久影院官网| 久久久久国产精品麻豆| 国产欧美日韩亚州综合| 国产精品欧美精品| 亚洲欧洲www| 亚洲一区二区欧美| 五月天一区二区三区| 日韩精品乱码免费| 蜜臀av性久久久久蜜臀aⅴ| 日本女人一区二区三区| 免费精品视频在线| 国产麻豆欧美日韩一区| 成人亚洲一区二区一| 91丨porny丨户外露出| 欧美性xxxxxxxx| 91精品国产91综合久久蜜臀| 精品日韩av一区二区| www一区二区| 亚洲精品乱码久久久久久久久| 亚洲成人激情av| 免费三级欧美电影| 丁香啪啪综合成人亚洲小说 | 91片黄在线观看| 欧美探花视频资源| 精品国产污网站| 一区在线观看免费| 日本欧美大码aⅴ在线播放| 国产成人av福利| 欧美视频在线播放| 26uuu精品一区二区在线观看| 中文字幕一区二区三区色视频 | 免费欧美在线视频| 成人免费电影视频| 91精品欧美综合在线观看最新| 亚洲精品一区二区三区蜜桃下载 | 大美女一区二区三区| 在线观看日韩毛片| 国产午夜亚洲精品理论片色戒| 亚洲精品大片www| 国产精品1024| 日韩午夜av一区| 一区二区在线观看视频在线观看| 精品一区二区三区久久久| 在线日韩av片| 中文字幕二三区不卡| 奇米影视在线99精品| 日本韩国精品一区二区在线观看| 久久看人人爽人人| 蜜臀av性久久久久蜜臀aⅴ流畅| 91电影在线观看| 一区在线观看视频| 成人福利视频网站| 国产拍欧美日韩视频二区| 亚洲成a人片在线不卡一二三区| 成人黄色av电影| 欧美激情在线观看视频免费| 美女被吸乳得到大胸91| 欧美喷潮久久久xxxxx| 亚洲线精品一区二区三区八戒| 99在线精品视频| 久久精品一区二区| 国产精品资源在线观看| 欧美一级爆毛片| 全国精品久久少妇| 欧美一区二区精品久久911| 亚洲电影在线播放| 欧美人狂配大交3d怪物一区| 亚洲一区二区在线免费观看视频| 91亚洲午夜精品久久久久久| 综合久久一区二区三区| 北条麻妃一区二区三区| 亚洲欧洲色图综合| av电影在线不卡| 亚洲欧美另类综合偷拍| 色婷婷综合久久久| 亚洲精品视频一区二区| 欧美亚洲综合色| 午夜国产精品影院在线观看| 欧美日韩电影在线| 精品一区二区三区在线观看| 欧美精品一区二区三区四区| 国产酒店精品激情| 成人欧美一区二区三区1314| 91浏览器入口在线观看| 亚洲综合男人的天堂| 91精品国产综合久久精品麻豆| 欧美aaa在线| 国产视频一区二区在线| 成人精品免费视频| 亚洲一区二区三区视频在线| 欧美一二三四在线| 国产不卡在线播放| 亚洲专区一二三| 日韩欧美国产1| 成人精品视频一区| 亚瑟在线精品视频| 久久九九99视频| 欧美亚日韩国产aⅴ精品中极品| 美腿丝袜亚洲一区| 亚洲图片欧美激情| 欧美一卡在线观看| 成人av免费在线| 首页综合国产亚洲丝袜| 欧美国产乱子伦| 欧美日韩高清一区二区不卡| 国产.欧美.日韩| 日韩专区在线视频| |精品福利一区二区三区| 3d动漫精品啪啪1区2区免费| 懂色av一区二区三区免费观看| 午夜欧美一区二区三区在线播放| 久久夜色精品国产噜噜av| 色欲综合视频天天天| 久久99蜜桃精品| 一区二区三区在线观看视频| 日韩欧美成人一区二区| 日本高清免费不卡视频| 国产精品一区二区在线观看不卡 | 日本午夜精品一区二区三区电影| 国产精品视频yy9299一区| 911精品国产一区二区在线| 成人教育av在线| 精品无人码麻豆乱码1区2区| 亚洲一区视频在线| 中文字幕一区二区在线播放| 久久欧美中文字幕| 日韩视频免费直播| 在线不卡中文字幕播放| 北岛玲一区二区三区四区| 国产精品一二三四五| 美女视频黄免费的久久| 一区二区视频免费在线观看| 欧美韩日一区二区三区| 欧美成人性福生活免费看| 7777精品伊人久久久大香线蕉超级流畅| 国产成人av资源| 国产精品一区二区免费不卡 | 精品乱码亚洲一区二区不卡| 在线观看免费视频综合| 91麻豆免费观看| av一区二区三区四区| 成人动漫精品一区二区| 国产98色在线|日韩| 国产精品一级二级三级| 国产精品影视网| 国产成人精品亚洲777人妖| 国产精品羞羞答答xxdd| 国产成人精品一区二区三区四区| 国产精品一线二线三线精华| 国产精品66部| 成人国产一区二区三区精品| caoporen国产精品视频| www.亚洲色图| 一本到一区二区三区| 欧洲一区二区三区在线| 欧美日韩视频不卡| 777久久久精品| 精品国产乱码久久久久久久| 久久久精品国产免费观看同学| 久久婷婷成人综合色| 国产精品视频观看| 一区二区三区在线不卡| 亚洲国产成人av网| 免费成人av在线播放| 国内国产精品久久| 不卡一区中文字幕| 日本道色综合久久| 欧美日产国产精品| www亚洲一区| 亚洲欧美日韩国产中文在线| 亚洲一区二区三区在线| 美女精品一区二区| av不卡免费电影| 在线观看av不卡| 精品国产一区二区三区久久久蜜月 | 国产精品久久久久久久久久久免费看 | 日韩欧美亚洲一区二区| 国产区在线观看成人精品| 亚洲人成亚洲人成在线观看图片| 香蕉久久夜色精品国产使用方法| 日韩av一区二区在线影视| 国产成人免费视| 欧美日韩一区二区在线观看| 欧美tickling挠脚心丨vk| 国产精品视频第一区| 青青草成人在线观看| 波多野结衣在线一区| 日韩三级免费观看| 一区二区不卡在线视频 午夜欧美不卡在| 天天操天天色综合| 不卡电影一区二区三区| 欧美一区日本一区韩国一区| 国产精品白丝在线| 国产伦精品一区二区三区在线观看| 色偷偷成人一区二区三区91 | 亚洲激情自拍视频|