亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
波多野洁衣一区| 狠狠色伊人亚洲综合成人| 精品视频在线免费看| 日韩av不卡一区二区| 欧美一级电影网站| 成人夜色视频网站在线观看| 亚洲一区二区三区四区五区黄| 欧美一级在线视频| 日韩二区三区四区| 国产精品久久久久久久久图文区| 欧美日韩精品一区二区天天拍小说| 美女一区二区三区| 亚洲美女视频在线观看| 日韩精品资源二区在线| 不卡的av电影在线观看| 日本sm残虐另类| 国产精品二区一区二区aⅴ污介绍| 欧美男同性恋视频网站| 国产成人午夜精品影院观看视频 | 狠狠久久亚洲欧美| 亚洲欧洲精品天堂一级| 欧美mv日韩mv亚洲| 欧美色图天堂网| 丁香六月久久综合狠狠色| 日韩电影一区二区三区四区| 中文字幕日本乱码精品影院| 精品国产免费一区二区三区四区| 日本精品一区二区三区高清 | 色综合天天做天天爱| 麻豆高清免费国产一区| 日韩电影在线一区| 五月婷婷综合网| 亚洲一区av在线| 亚洲综合图片区| 一级做a爱片久久| 洋洋成人永久网站入口| 亚洲三级久久久| 亚洲免费av高清| 亚洲免费大片在线观看| 亚洲精品国产视频| 亚洲免费在线电影| 一区二区高清免费观看影视大全 | 国产一区二区三区久久久 | 在线视频综合导航| 欧美色国产精品| 欧美精品久久99久久在免费线 | 欧美日韩亚洲综合在线| 欧美精品第1页| 日韩免费电影网站| 久久久欧美精品sm网站| 国产精品无遮挡| 亚洲蜜臀av乱码久久精品蜜桃| 一区二区高清在线| 日日摸夜夜添夜夜添国产精品 | 久久99热狠狠色一区二区| 极品少妇xxxx精品少妇| 国产露脸91国语对白| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 国产精品福利电影一区二区三区四区 | 99精品国产91久久久久久| 91日韩精品一区| 在线不卡一区二区| 欧美大片在线观看一区二区| 日本一区二区三区免费乱视频| 最新国产成人在线观看| 亚洲制服丝袜av| 捆绑调教一区二区三区| 顶级嫩模精品视频在线看| 91老司机福利 在线| 欧洲视频一区二区| 日韩欧美激情四射| 中文字幕国产精品一区二区| 亚洲视频一区二区在线观看| 五月天欧美精品| 国产一区在线观看视频| 色综合av在线| 精品久久久久99| 亚洲青青青在线视频| 美女脱光内衣内裤视频久久影院| 国产成人精品午夜视频免费| 一本大道av伊人久久综合| 日韩欧美黄色影院| 亚洲日本va在线观看| 日本中文字幕一区| 成人av中文字幕| 欧美日韩国产免费一区二区| 久久久久久久久久久久久夜| 一区二区免费看| 国产在线精品不卡| 在线观看精品一区| 久久精品综合网| 五月天激情综合| eeuss国产一区二区三区| 欧美一卡在线观看| 一区二区三区在线视频观看| 国产一区二区三区四区五区美女| 欧美三级蜜桃2在线观看| 中文字幕精品三区| 国产一区二区视频在线播放| 在线免费不卡电影| 国产午夜精品一区二区三区四区| 亚洲成av人在线观看| 成人免费黄色大片| 精品国免费一区二区三区| 亚洲国产综合视频在线观看| 成人福利视频在线| 久久精品亚洲一区二区三区浴池| 视频一区二区国产| 欧美在线free| 中文字幕一区二区三区四区| 精品综合久久久久久8888| 色婷婷香蕉在线一区二区| 日本一区二区三区免费乱视频| 免费观看成人鲁鲁鲁鲁鲁视频| 一本色道久久综合亚洲精品按摩| 国产网红主播福利一区二区| 美女视频网站久久| 在线区一区二视频| 亚洲色图视频网站| 成人性生交大片免费看中文| 精品国产一二三| 免费观看在线色综合| 欧美日韩国产区一| 亚洲电影一区二区| 日本黄色一区二区| 中文字幕在线观看不卡视频| 国产美女精品人人做人人爽| 精品欧美久久久| 美女视频黄a大片欧美| 欧美肥大bbwbbw高潮| 亚洲18色成人| 欧美日本韩国一区| 偷拍亚洲欧洲综合| 9191成人精品久久| 美女国产一区二区三区| 日韩一区二区三区在线观看| 裸体一区二区三区| 精品国产91九色蝌蚪| 国产一区二区三区国产| 国产拍揄自揄精品视频麻豆| 成人精品一区二区三区四区| 国产精品久久久久天堂| 99麻豆久久久国产精品免费优播| 国产精品国产三级国产aⅴ入口| 不卡欧美aaaaa| 艳妇臀荡乳欲伦亚洲一区| 欧美中文字幕一区二区三区亚洲| 亚洲一区二区综合| 欧美日本一区二区在线观看| 亚洲电影一级黄| 日韩美女在线视频| 久久成人精品无人区| 国产欧美日本一区视频| 成人av资源站| 一区二区三区欧美亚洲| 欧美日韩精品一区二区三区蜜桃| 免费亚洲电影在线| 久久久www成人免费无遮挡大片| 懂色av一区二区三区蜜臀| 亚洲欧洲精品天堂一级| 欧美日韩黄色影视| 狠狠色2019综合网| 中文字幕视频一区| 欧美日韩一卡二卡三卡 | 国产日韩精品一区| 91在线云播放| 视频一区欧美精品| 久久久精品影视| 在线亚洲+欧美+日本专区| 日韩黄色片在线观看| 国产日韩精品一区| 欧美亚洲动漫另类| 久久99国内精品| 中文字幕在线播放不卡一区| 欧美日韩国产综合一区二区三区| 极品少妇xxxx精品少妇| 亚洲欧美激情一区二区| 91精品国产综合久久精品性色| 国产高清一区日本| 亚洲一区二区四区蜜桃| 久久久久久久久久看片| 欧美午夜不卡视频| www.日本不卡| 日韩电影在线一区二区| 中文成人综合网| 欧美一二三区在线观看| 97久久精品人人做人人爽| 蓝色福利精品导航| 一区二区三区中文字幕精品精品 | 精品国产一区二区精华| 欧美在线不卡视频| 成人精品免费网站| 免费观看一级特黄欧美大片| 亚洲六月丁香色婷婷综合久久 | 不卡av电影在线播放| 免费人成在线不卡| 亚洲激情图片qvod| 国产精品日日摸夜夜摸av| 日韩一区二区三区视频在线| 色综合视频在线观看|