~ubuntu-branches/debian/squeeze/ghostscript/squeeze

« back to all changes in this revision

Viewing changes to jbig2dec/jbig2_text.c

  • Committer: Bazaar Package Importer
  • Author(s): Masayuki Hatta (mhatta)
  • Date: 2009-01-04 12:09:59 UTC
  • mfrom: (16.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090104120959-m9lbagj775ucg0h3
Tags: 8.63.dfsg.1-2
libgs-dev: put versioned dependency on libgs8 - closes: #510691

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
    jbig2dec
3
3
    
4
 
    Copyright (C) 2002-2005 Artifex Software, Inc.
 
4
    Copyright (C) 2002-2008 Artifex Software, Inc.
5
5
    
6
6
    This software is distributed under license and may not
7
7
    be copied, modified or distributed except as expressly
13
13
    Artifex Software, Inc.,  101 Lucas Valley Road #110,
14
14
    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
15
15
 
16
 
    $Id: jbig2_text.c 8429 2007-12-10 09:45:03Z ken $
 
16
    $Id: jbig2_text.c 8723 2008-05-09 14:00:44Z giles $
17
17
*/
18
18
 
19
19
#ifdef HAVE_CONFIG_H
147
147
              /* todo: memory cleanup */
148
148
              return -1;
149
149
            }
150
 
            len = symcodelengths[index-1].PREFLEN;
 
150
            if (code == 32) {
 
151
              len = symcodelengths[index-1].PREFLEN;
 
152
            } else {
 
153
              len = 0; /* code == 33 or 34 */
 
154
            }
151
155
            if (code == 32) range = jbig2_huffman_get_bits(hs, 2) + 3;
152
156
            else if (code == 33) range = jbig2_huffman_get_bits(hs, 3) + 3;
153
157
            else if (code == 34) range = jbig2_huffman_get_bits(hs, 7) + 11;