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

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

?? infback.c

?? 這是一個三層的進銷存系統
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* infback.c -- inflate using a call-back interface
 * Copyright (C) 1995-2003 Mark Adler
 * For conditions of distribution and use, see copyright notice in zlib.h
 */

/*
   This code is largely copied from inflate.c.  Normally either infback.o or
   inflate.o would be linked into an application--not both.  The interface
   with inffast.c is retained so that optimized assembler-coded versions of
   inflate_fast() can be used with either inflate.c or infback.c.
 */

#include "zutil.h"
#include "inftrees.h"
#include "inflate.h"
#include "inffast.h"

/* function prototypes */
local void fixedtables OF((struct inflate_state FAR *state));

/*
   strm provides memory allocation functions in zalloc and zfree, or
   Z_NULL to use the library memory allocation functions.

   windowBits is in the range 8..15, and window is a user-supplied
   window and output buffer that is 2**windowBits bytes.
 */
int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
z_stream FAR *strm;
int windowBits;
unsigned char FAR *window;
const char *version;
int stream_size;
{
    struct inflate_state FAR *state;

    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
        stream_size != (int)(sizeof(z_stream)))
        return Z_VERSION_ERROR;
    if (strm == Z_NULL || window == Z_NULL ||
        windowBits < 8 || windowBits > 15)
        return Z_STREAM_ERROR;
    strm->msg = Z_NULL;                 /* in case we return an error */
    if (strm->zalloc == (alloc_func)0) {
        strm->zalloc = zcalloc;
        strm->opaque = (voidpf)0;
    }
    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
    state = (struct inflate_state FAR *)ZALLOC(strm, 1,
                                               sizeof(struct inflate_state));
    if (state == Z_NULL) return Z_MEM_ERROR;
    Tracev((stderr, "inflate: allocated\n"));
    strm->state = (voidpf)state;
    state->wbits = windowBits;
    state->wsize = 1U << windowBits;
    state->window = window;
    state->write = 0;
    state->whave = 0;
    return Z_OK;
}

/*
   Return state with length and distance decoding tables and index sizes set to
   fixed code decoding.  Normally this returns fixed tables from inffixed.h.
   If BUILDFIXED is defined, then instead this routine builds the tables the
   first time it's called, and returns those tables the first time and
   thereafter.  This reduces the size of the code by about 2K bytes, in
   exchange for a little execution time.  However, BUILDFIXED should not be
   used for threaded applications, since the rewriting of the tables and virgin
   may not be thread-safe.
 */
local void fixedtables(state)
struct inflate_state FAR *state;
{
#ifdef BUILDFIXED
    static int virgin = 1;
    static code *lenfix, *distfix;
    static code fixed[544];

    /* build fixed huffman tables if first call (may not be thread safe) */
    if (virgin) {
        unsigned sym, bits;
        static code *next;

        /* literal/length table */
        sym = 0;
        while (sym < 144) state->lens[sym++] = 8;
        while (sym < 256) state->lens[sym++] = 9;
        while (sym < 280) state->lens[sym++] = 7;
        while (sym < 288) state->lens[sym++] = 8;
        next = fixed;
        lenfix = next;
        bits = 9;
        inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);

        /* distance table */
        sym = 0;
        while (sym < 32) state->lens[sym++] = 5;
        distfix = next;
        bits = 5;
        inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);

        /* do this just once */
        virgin = 0;
    }
#else /* !BUILDFIXED */
#   include "inffixed.h"
#endif /* BUILDFIXED */
    state->lencode = lenfix;
    state->lenbits = 9;
    state->distcode = distfix;
    state->distbits = 5;
}

/* Macros for inflateBack(): */

/* Load returned state from inflate_fast() */
#define LOAD() \
    do { \
        put = strm->next_out; \
        left = strm->avail_out; \
        next = strm->next_in; \
        have = strm->avail_in; \
        hold = state->hold; \
        bits = state->bits; \
    } while (0)

/* Set state from registers for inflate_fast() */
#define RESTORE() \
    do { \
        strm->next_out = put; \
        strm->avail_out = left; \
        strm->next_in = next; \
        strm->avail_in = have; \
        state->hold = hold; \
        state->bits = bits; \
    } while (0)

/* Clear the input bit accumulator */
#define INITBITS() \
    do { \
        hold = 0; \
        bits = 0; \
    } while (0)

/* Assure that some input is available.  If input is requested, but denied,
   then return a Z_BUF_ERROR from inflateBack(). */
#define PULL() \
    do { \
        if (have == 0) { \
            have = in(in_desc, &next); \
            if (have == 0) { \
                next = Z_NULL; \
                ret = Z_BUF_ERROR; \
                goto inf_leave; \
            } \
        } \
    } while (0)

/* Get a byte of input into the bit accumulator, or return from inflateBack()
   with an error if there is no input available. */
#define PULLBYTE() \
    do { \
        PULL(); \
        have--; \
        hold += (unsigned long)(*next++) << bits; \
        bits += 8; \
    } while (0)

/* Assure that there are at least n bits in the bit accumulator.  If there is
   not enough available input to do that, then return from inflateBack() with
   an error. */
#define NEEDBITS(n) \
    do { \
        while (bits < (unsigned)(n)) \
            PULLBYTE(); \
    } while (0)

/* Return the low n bits of the bit accumulator (n < 16) */
#define BITS(n) \
    ((unsigned)hold & ((1U << (n)) - 1))

/* Remove n bits from the bit accumulator */
#define DROPBITS(n) \
    do { \
        hold >>= (n); \
        bits -= (unsigned)(n); \
    } while (0)

/* Remove zero to seven bits as needed to go to a byte boundary */
#define BYTEBITS() \
    do { \
        hold >>= bits & 7; \
        bits -= bits & 7; \
    } while (0)

/* Assure that some output space is available, by writing out the window
   if it's full.  If the write fails, return from inflateBack() with a
   Z_BUF_ERROR. */
#define ROOM() \
    do { \
        if (left == 0) { \
            put = state->window; \
            left = state->wsize; \
            state->whave = left; \
            if (out(out_desc, put, left)) { \
                ret = Z_BUF_ERROR; \
                goto inf_leave; \
            } \
        } \
    } while (0)

/*
   strm provides the memory allocation functions and window buffer on input,
   and provides information on the unused input on return.  For Z_DATA_ERROR
   returns, strm will also provide an error message.

   in() and out() are the call-back input and output functions.  When
   inflateBack() needs more input, it calls in().  When inflateBack() has
   filled the window with output, or when it completes with data in the
   window, it calls out() to write out the data.  The application must not
   change the provided input until in() is called again or inflateBack()
   returns.  The application must not change the window/output buffer until
   inflateBack() returns.

   in() and out() are called with a descriptor parameter provided in the
   inflateBack() call.  This parameter can be a structure that provides the
   information required to do the read or write, as well as accumulated
   information on the input and output such as totals and check values.

   in() should return zero on failure.  out() should return non-zero on
   failure.  If either in() or out() fails, than inflateBack() returns a
   Z_BUF_ERROR.  strm->next_in can be checked for Z_NULL to see whether it
   was in() or out() that caused in the error.  Otherwise,  inflateBack()
   returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
   error, or Z_MEM_ERROR if it could not allocate memory for the state.
   inflateBack() can also return Z_STREAM_ERROR if the input parameters
   are not correct, i.e. strm is Z_NULL or the state was not initialized.
 */
int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)
z_stream FAR *strm;
in_func in;
void FAR *in_desc;
out_func out;
void FAR *out_desc;
{
    struct inflate_state FAR *state;
    unsigned char FAR *next;    /* next input */
    unsigned char FAR *put;     /* next output */
    unsigned have, left;        /* available input and output */
    unsigned long hold;         /* bit buffer */
    unsigned bits;              /* bits in bit buffer */
    unsigned copy;              /* number of stored or match bytes to copy */
    unsigned char FAR *from;    /* where to copy match bytes from */
    code this;                  /* current decoding table entry */
    code last;                  /* parent table entry */
    unsigned len;               /* length to copy for repeats, bits to drop */
    int ret;                    /* return code */
    static const unsigned short order[19] = /* permutation of code lengths */
        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};

    /* Check that the strm exists and that the state was initialized */
    if (strm == Z_NULL || strm->state == Z_NULL)
        return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;

    /* Reset the state */
    strm->msg = Z_NULL;
    state->mode = TYPE;
    state->last = 0;
    state->whave = 0;
    next = strm->next_in;
    have = next != Z_NULL ? strm->avail_in : 0;
    hold = 0;
    bits = 0;
    put = state->window;
    left = state->wsize;

    /* Inflate until end of block marked as last */
    for (;;)
        switch (state->mode) {
        case TYPE:
            /* determine and dispatch block type */
            if (state->last) {
                BYTEBITS();
                state->mode = DONE;
                break;
            }
            NEEDBITS(3);
            state->last = BITS(1);
            DROPBITS(1);
            switch (BITS(2)) {
            case 0:                             /* stored block */
                Tracev((stderr, "inflate:     stored block%s\n",
                        state->last ? " (last)" : ""));
                state->mode = STORED;
                break;
            case 1:                             /* fixed block */
                fixedtables(state);
                Tracev((stderr, "inflate:     fixed codes block%s\n",
                        state->last ? " (last)" : ""));
                state->mode = LEN;              /* decode codes */
                break;
            case 2:                             /* dynamic block */
                Tracev((stderr, "inflate:     dynamic codes block%s\n",
                        state->last ? " (last)" : ""));
                state->mode = TABLE;
                break;
            case 3:
                strm->msg = (char *)"invalid block type";

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色欧美片视频在线观看| 亚洲丝袜精品丝袜在线| 中文字幕免费一区| 一区二区三区成人| 国产精品亚洲综合一区在线观看| 色偷偷久久人人79超碰人人澡| 精品国产免费人成电影在线观看四季| 亚洲欧美电影一区二区| 黄色日韩网站视频| 欧美人妖巨大在线| 国产精品私人影院| 国产原创一区二区| 日韩欧美亚洲国产另类| 亚洲国产精品一区二区久久 | 日本成人在线视频网站| 99精品国产热久久91蜜凸| 久久综合久久久久88| 亚洲成人激情自拍| 91麻豆国产福利在线观看| 日本一区二区视频在线| 久久av老司机精品网站导航| 欧美区在线观看| 亚洲欧美一区二区三区久本道91| 国产成人在线影院| 久久久久久97三级| 国产一区二区电影| 精品国产伦一区二区三区观看方式| 丝袜a∨在线一区二区三区不卡| 在线视频国产一区| 亚洲最大色网站| 色婷婷久久久久swag精品 | 欧美一区二区播放| 亚洲成人精品一区二区| 精品国产污网站| 免费高清在线视频一区·| 欧美妇女性影城| 亚洲电影一区二区| 欧美性淫爽ww久久久久无| 亚洲综合精品自拍| 欧美老女人在线| 免费成人av资源网| 日韩一区二区视频在线观看| 麻豆国产精品777777在线| 日韩视频在线你懂得| 韩国三级电影一区二区| 欧美激情综合网| av一区二区久久| 亚洲第一av色| 欧美精品乱码久久久久久| 麻豆91在线观看| 亚洲国产精品成人综合| caoporm超碰国产精品| 亚洲美女免费在线| 欧美一区二区三区在线观看| 精品一区二区在线看| 国产蜜臀av在线一区二区三区| av成人免费在线| 亚洲电影激情视频网站| 精品国产一区二区精华| 大白屁股一区二区视频| 樱桃视频在线观看一区| 欧美一区二区大片| 成人天堂资源www在线| 亚洲国产精品人人做人人爽| 日韩一级二级三级| av在线播放一区二区三区| 天天av天天翘天天综合网色鬼国产| 欧美zozozo| 91黄色在线观看| 精品午夜久久福利影院| 亚洲素人一区二区| 日韩欧美一区二区不卡| av午夜一区麻豆| 日韩成人午夜电影| 国产精品午夜免费| 欧美一级专区免费大片| 暴力调教一区二区三区| 午夜欧美一区二区三区在线播放| 久久精品一区蜜桃臀影院| 91免费看`日韩一区二区| 久草热8精品视频在线观看| 国产精品卡一卡二| 精品女同一区二区| 91成人在线精品| 国产91在线看| 免费观看一级特黄欧美大片| 国产精品久99| 久久久精品免费免费| 制服丝袜亚洲色图| 91国产成人在线| 成人福利视频在线看| 精品亚洲免费视频| 天堂一区二区在线免费观看| 亚洲欧美日韩电影| 国产精品私房写真福利视频| 日韩一级片在线播放| 欧美精选午夜久久久乱码6080| 91丝袜美女网| 波多野结衣精品在线| 国产精品影视网| 精品影院一区二区久久久| 五月综合激情日本mⅴ| 亚洲综合图片区| 亚洲狼人国产精品| ...中文天堂在线一区| 国产亚洲欧美在线| 久久久三级国产网站| 欧美电影免费观看高清完整版在线观看 | 一区在线播放视频| 国产亚洲欧美在线| 久久久高清一区二区三区| 日韩免费观看高清完整版在线观看| 欧美吻胸吃奶大尺度电影| 99久久婷婷国产综合精品电影 | 91成人在线免费观看| 91网站最新地址| 色欧美88888久久久久久影院| 国产成人免费视频精品含羞草妖精| 久久国产生活片100| 久久精品国产久精国产爱| 日本vs亚洲vs韩国一区三区 | 国产在线播放一区三区四| 久久疯狂做爰流白浆xx| 99精品在线观看视频| 99麻豆久久久国产精品免费优播| 丁香天五香天堂综合| 菠萝蜜视频在线观看一区| av电影在线观看不卡| 色综合天天天天做夜夜夜夜做| 99久久综合国产精品| 91色porny在线视频| 欧美性色黄大片| 欧美精品在线视频| 精品日韩成人av| 亚洲国产高清不卡| 亚洲另类一区二区| 日韩精品一二三| 国产黄人亚洲片| 91丨porny丨最新| 欧美人妇做爰xxxⅹ性高电影| 91麻豆精品国产91久久久久久久久| 欧美一区二区人人喊爽| 久久精品视频一区二区| 中文字幕一区二区三区不卡 | 午夜精品免费在线| 捆绑紧缚一区二区三区视频| 国产一区二区剧情av在线| www.欧美日韩国产在线| 欧美日韩国产天堂| 日韩欧美国产一区二区三区 | 亚洲不卡av一区二区三区| 久久www免费人成看片高清| 风间由美中文字幕在线看视频国产欧美| 成人动漫一区二区| 精品视频色一区| 国产亚洲污的网站| 午夜伦理一区二区| 国产福利91精品一区二区三区| 日本久久一区二区三区| 精品伦理精品一区| 夜夜嗨av一区二区三区中文字幕| 乱一区二区av| 91久久精品一区二区| 久久久久久免费| 亚洲激情男女视频| 韩国精品久久久| 欧美日韩亚洲综合在线| 日韩理论在线观看| 国产成人三级在线观看| 国产精品成人免费在线| 久久精品国产免费| 欧美三级乱人伦电影| 中文字幕一区在线观看视频| 久久99精品一区二区三区| 欧美日韩一区二区三区四区| 国产精品免费免费| 国产一区在线看| 欧美大胆一级视频| 亚洲国产va精品久久久不卡综合| 国产成人免费视频网站高清观看视频 | 精品国产欧美一区二区| 午夜精品一区二区三区三上悠亚| 国产成人久久精品77777最新版本| 欧美一级二级在线观看| 一区二区三区自拍| 91色乱码一区二区三区| 国产精品你懂的在线| 国产在线视频一区二区三区| 欧美精选在线播放| 亚洲午夜精品久久久久久久久| 99久久综合狠狠综合久久| 国产精品美女久久久久久 | 天天综合网天天综合色| 99视频一区二区三区| 欧美激情一区二区三区| 极品美女销魂一区二区三区| 欧美日本在线看| 亚洲成av人片在www色猫咪| 欧美综合在线视频| 一区二区三区中文字幕|