Ignore:
Timestamp:
Jul 25, 2007, 5:59:35 PM (14 years ago)
Author:
Eugene Romanenko
Message:

DJVU plugin: djvulibre updated to version 3.5.19

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libdjvu/IW44Image.cpp

    r17 r206  
    66//C-
    77//C- This software is subject to, and may be distributed under, the
    8 //C- GNU General Public License, Version 2. The license should have
     8//C- GNU General Public License, either Version 2 of the license,
     9//C- or (at your option) any later version. The license should have
    910//C- accompanied the software or you may obtain a copy of the license
    1011//C- from the Free Software Foundation at http://www.fsf.org .
     
    1516//C- GNU General Public License for more details.
    1617//C-
    17 //C- DjVuLibre-3.5 is derived from the DjVu(r) Reference Library
    18 //C- distributed by Lizardtech Software.  On July 19th 2002, Lizardtech
    19 //C- Software authorized us to replace the original DjVu(r) Reference
    20 //C- Library notice by the following text (see doc/lizard2002.djvu):
     18//C- DjVuLibre-3.5 is derived from the DjVu(r) Reference Library from
     19//C- Lizardtech Software.  Lizardtech Software has authorized us to
     20//C- replace the original DjVu(r) Reference Library notice by the following
     21//C- text (see doc/lizard2002.djvu and doc/lizardtech2007.djvu):
    2122//C-
    2223//C-  ------------------------------------------------------------------
     
    2728//C- |
    2829//C- | This software is subject to, and may be distributed under, the
    29 //C- | GNU General Public License, Version 2. The license should have
     30//C- | GNU General Public License, either Version 2 of the license,
     31//C- | or (at your option) any later version. The license should have
    3032//C- | accompanied the software or you may obtain a copy of the license
    3133//C- | from the Free Software Foundation at http://www.fsf.org .
     
    5254//C- +------------------------------------------------------------------
    5355//
    54 // $Id: IW44Image.cpp,v 1.11 2004/08/06 15:11:29 leonb Exp $
    55 // $Name: $
     56// $Id: IW44Image.cpp,v 1.13 2007/03/25 20:48:32 leonb Exp $
     57// $Name: release_3_5_19 $
    5658
    5759#ifdef HAVE_CONFIG_H
     
    549551  Alloc *next;
    550552  short data[IWALLOCSIZE];
     553  Alloc(Alloc *n);
    551554};
    552555
     
    620623}
    621624
     625
     626IW44Image::Alloc::Alloc(Alloc *n)
     627  : next(n)
     628{
     629  // see note in IW44Image::Map::alloc
     630  memset(data, 0, sizeof(data));
     631}
     632
    622633short *
    623634IW44Image::Map::alloc(int n)
     
    625636  if (top+n > IWALLOCSIZE)
    626637    {
    627       IW44Image::Alloc *n = new IW44Image::Alloc;
    628       n->next = chain;
    629       chain = n;
     638      // note: everything is cleared long before we use it
     639      // in order to avoid the need for a memory fence.
     640      chain = new IW44Image::Alloc(chain);
    630641      top = 0;
    631642    }
    632643  short *ans = chain->data + top;
    633644  top += n;
    634   memset((void*)ans, 0, sizeof(short)*n);
    635645  return ans;
    636646}
Note: See TracChangeset for help on using the changeset viewer.