~ubuntu-branches/ubuntu/hardy/clamav/hardy-backports

« back to all changes in this revision

Viewing changes to libclamav/nsis/infblock.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Meskes, Stephen Gran, Michael Meskes, Michael Tautschnig
  • Date: 2008-11-29 12:15:34 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (4.1.3 sid) (0.5.4 karmic)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20081129121534-8sbpoy6kr01ox2eo
[ Stephen Gran ]
* New upstream version

[ Michael Meskes ]
* Removed unused debconf templates and unfuzzied all translations.

[ Michael Tautschnig ]
* Removed --unzip from clampipe script (closes: #506055)
* Moved clamav-milter specific stuff from its specific README.Debian to
  clamav-global one.
* Sync start of clamav-milter with clamav-daemon when clamav-daemon is being
  upgraded (closes: #309067)
* The TemporaryDirectory option has been added long ago, no need for hacks
  via clamav-daemon.default anymore (closes: #253080)

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 
53
53
#define LAST (s->last == DRY)
54
54
 
55
 
#define FIXEDH 544      /* number of hufts used by fixed tables */
56
 
 
57
 
 
58
55
 
59
56
typedef struct inflate_blocks_state FAR inflate_blocks_statef;
60
57
#define exop word.what.Exop
61
58
#define bits word.what.Bits
62
59
 
63
60
/* And'ing with mask[n] masks the lower n bits */
64
 
local unsigned short inflate_mask[17] = {
 
61
local const unsigned short inflate_mask[17] = {
65
62
    0x0000,
66
63
    0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
67
64
    0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
87
84
        12, 12, 13, 13};
88
85
 
89
86
/* build fixed tables only once--keep them here */
90
 
local char fixed_built = 0;
91
 
local inflate_huft fixed_mem[FIXEDH];
92
 
local uInt fixed_bl=9;
93
 
local uInt fixed_bd=5;
94
 
local inflate_huft *fixed_tl;
95
 
local inflate_huft *fixed_td;
 
87
/* local char fixed_built = 0; */
 
88
/* local inflate_huft fixed_mem[FIXEDH]; */
 
89
/* local uInt fixed_bl=9; */
 
90
/* local uInt fixed_bd=5; */
 
91
/* local inflate_huft *fixed_tl; */
 
92
/* local inflate_huft *fixed_td; */
 
93
 
96
94
 
97
95
/* copy as much as possible from the sliding window to the output area */
98
96
local void ZEXPORT inflate_flush(nsis_z_streamp z)
380
378
          Tracev((stderr, "inflate:     fixed codes block%s\n",
381
379
                 LAST ? " (last)" : ""));
382
380
          {
383
 
            if (!fixed_built)
 
381
            if (!s->zs.fixed_built)
384
382
            {
385
383
              int _k;              /* temporary variable */
386
384
              uInt f = 0;         /* number of hufts used in fixed_mem */
398
396
                lc[_k] = v;
399
397
              }
400
398
 
401
 
              huft_build(lc, 288, 257, cplens, cplext, &fixed_tl, &fixed_bl, fixed_mem, &f);
 
399
              huft_build(lc, 288, 257, cplens, cplext, &s->zs.fixed_tl, &s->zs.fixed_bl, s->zs.fixed_mem, &f);
402
400
 
403
401
              /* distance table */
404
402
              for (_k = 0; _k < 30; _k++) lc[_k] = 5;
405
403
 
406
 
              huft_build(lc, 30, 0, cpdist, cpdext, &fixed_td, &fixed_bd, fixed_mem, &f);
 
404
              huft_build(lc, 30, 0, cpdist, cpdext, &s->zs.fixed_td, &s->zs.fixed_bd, s->zs.fixed_mem, &f);
407
405
 
408
406
              /* done */
409
 
              fixed_built++;
 
407
              s->zs.fixed_built++;
410
408
            }
411
409
 
412
410
            /* s->sub.decode.t_codes.mode = CODES_START; */
413
 
            s->sub.decode.t_codes.lbits = (Byte)fixed_bl;
414
 
            s->sub.decode.t_codes.dbits = (Byte)fixed_bd;
415
 
            s->sub.decode.t_codes.ltree = fixed_tl;
416
 
            s->sub.decode.t_codes.dtree = fixed_td;
 
411
            s->sub.decode.t_codes.lbits = (Byte)s->zs.fixed_bl;
 
412
            s->sub.decode.t_codes.dbits = (Byte)s->zs.fixed_bd;
 
413
            s->sub.decode.t_codes.ltree = s->zs.fixed_tl;
 
414
            s->sub.decode.t_codes.dtree = s->zs.fixed_td;
417
415
          }
418
416
          s->mode = CODES_START;
419
417
          break;