shithub: jbig2

Download patch

ref: 43fcbcd7acbd0b2d64a770ca39590e2356df4337
parent: 54850de6b0bf55dd409a699be469a133be564028
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Fri Jun 13 18:42:55 EDT 2003

Update the license headers to use the same legal redirect as Ghostscript 
does. The individual files point to the file LICENSE which contains the 
real license (a pointer to the GPL in COPYING). This simplifies 
remarking for commercial distribution.

Also some minor additional debug prints in the symbol lookup code.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@259 ded80894-8fb9-0310-811b-c03f3676ab4d

--- /dev/null
+++ b/LICENSE
@@ -1,0 +1,18 @@
+  The files in this directory (folder) and any subdirectories 
+  (sub-folders) thereof are part of jbig2dec, with the exception
+  of certain source files included to support portability which are
+  marked otherwise in their copyright headers.
+
+  jbig2dec is free software; you can redistribute it and/or
+  modify it under the terms of version 2 of the GNU General Public
+  License as published by the Free Software Foundation.
+
+  This software is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program in the file named COPYING. If not, write 
+  to the Free Software Foundation, Inc., 59 Temple Place Suite 330,
+  Boston, MA 02111-1307, USA.
--- a/config_win32.h
+++ b/config_win32.h
@@ -1,3 +1,21 @@
+/*
+    jbig2dec
+
+    Copyright (c) 2002-2003 artofcode LLC.
+
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
+
+    $Id: $
+*/
+
 /* configuration header file for compiling under Microsoft Windows */
 
 /* update package version here */
--- a/jbig2.c
+++ b/jbig2.c
@@ -3,10 +3,18 @@
     
     Copyright (c) 2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is provided AS-IS with no warranty,
+    either express or implied.
+   
+    This software is distributed under license and may not 
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+   
+    For information on commercial licensing, go to 
+    http://www.artifex.com/licensing/ or contact 
+    Artifex Software, Inc.,  101 Lucas Valley Road #110, 
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
         
     $Id: jbig2.c,v 1.18 2003/02/03 20:04:11 giles Exp $
 */
--- a/jbig2.h
+++ b/jbig2.h
@@ -3,10 +3,15 @@
     
     Copyright (c) 2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
         
     $Id: jbig2.h,v 1.17 2003/03/05 14:29:35 giles Exp $
 */
--- a/jbig2_arith.c
+++ b/jbig2_arith.c
@@ -3,10 +3,18 @@
     
     Copyright (c) 2001 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is provided AS-IS with no warranty,
+    either express or implied.
+                                                                                
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: jbig2_arith.c,v 1.13 2002/08/14 10:25:59 giles Exp $
 */
--- a/jbig2_arith.h
+++ b/jbig2_arith.h
@@ -3,10 +3,15 @@
     
     Copyright (c) 2001 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: jbig2_arith.h,v 1.4 2002/02/16 07:25:36 raph Exp $
 */
--- a/jbig2_arith_iaid.c
+++ b/jbig2_arith_iaid.c
@@ -1,3 +1,24 @@
+/*
+    jbig2dec
+
+    Copyright (c) 2001 artofcode LLC.
+
+    This software is provided AS-IS with no warranty,
+    either express or implied.
+                                                                                
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
+
+    $Id: $
+*/
+
 /* Annex A.3 */
 
 #ifdef HAVE_CONFIG_H
--- a/jbig2_arith_iaid.h
+++ b/jbig2_arith_iaid.h
@@ -1,3 +1,21 @@
+/*
+    jbig2dec
+
+    Copyright (c) 2001 artofcode LLC.
+
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
+
+    $Id: $
+*/
+
 typedef struct _Jbig2ArithIaidCtx Jbig2ArithIaidCtx;
 
 Jbig2ArithIaidCtx *
--- a/jbig2_arith_int.c
+++ b/jbig2_arith_int.c
@@ -1,3 +1,24 @@
+/*
+    jbig2dec
+                                                                                
+    Copyright (c) 2001 artofcode LLC.
+                                                                                
+    This software is provided AS-IS with no warranty,
+    either express or implied.
+                                                                                
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
+                                                                                
+    $Id: jbig2_arith.c,v 1.13 2002/08/14 10:25:59 giles Exp $
+*/
+
 /* Annex A */
 
 #ifdef HAVE_CONFIG_H
--- a/jbig2_arith_int.h
+++ b/jbig2_arith_int.h
@@ -1,3 +1,21 @@
+/*
+    jbig2dec
+
+    Copyright (c) 2001 artofcode LLC.
+
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
+
+    $Id: $
+*/
+
 typedef struct _Jbig2ArithIntCtx Jbig2ArithIntCtx;
 
 Jbig2ArithIntCtx *
--- a/jbig2_generic.c
+++ b/jbig2_generic.c
@@ -3,11 +3,19 @@
     
     Copyright (c) 2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-        
+    This software is provided AS-IS with no warranty,
+    either express or implied.
+                                                                                
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
+                                                                                
     $Id: jbig2_generic.c,v 1.13 2002/07/20 17:23:15 giles Exp $
 */
 
--- a/jbig2_generic.h
+++ b/jbig2_generic.h
@@ -3,10 +3,15 @@
     
     Copyright (c) 2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
         
     $Id: jbig2_generic.h,v 1.7 2002/07/04 13:34:29 giles Exp $
 */
--- a/jbig2_huffman.c
+++ b/jbig2_huffman.c
@@ -3,10 +3,15 @@
     
     Copyright (c) 2001 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
     
     $Id: jbig2_huffman.c,v 1.11 2002/07/20 17:23:15 giles Exp $
 */
--- a/jbig2_huffman.h
+++ b/jbig2_huffman.h
@@ -3,10 +3,15 @@
     
     Copyright (c) 2001 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: jbig2_huffman.h,v 1.4 2002/06/15 16:02:53 giles Exp $
 */
--- a/jbig2_hufftab.h
+++ b/jbig2_hufftab.h
@@ -3,10 +3,15 @@
     
     Copyright (c) 2001 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
     
     $Id: jbig2_hufftab.h,v 1.3 2002/06/15 16:02:54 giles Exp $
 */
--- a/jbig2_image.c
+++ b/jbig2_image.c
@@ -3,10 +3,15 @@
     
     Copyright (c) 2001-2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: jbig2_image.c,v 1.21 2003/02/07 05:06:46 raph Exp $
 */
--- a/jbig2_image.h
+++ b/jbig2_image.h
@@ -3,10 +3,15 @@
     
     Copyright (c) 2001-2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: jbig2_image.h,v 1.5 2002/06/18 13:40:29 giles Exp $
 */
--- a/jbig2_image_pbm.c
+++ b/jbig2_image_pbm.c
@@ -3,10 +3,15 @@
     
     Copyright (c) 2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: jbig2_image_pbm.c,v 1.12 2002/08/15 14:54:45 giles Exp $
 */
--- a/jbig2_image_png.c
+++ b/jbig2_image_png.c
@@ -3,10 +3,15 @@
     
     Copyright (c) 2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: jbig2_image_png.c,v 1.9 2002/08/07 12:50:33 giles Exp $
 */
--- a/jbig2_metadata.c
+++ b/jbig2_metadata.c
@@ -3,10 +3,15 @@
     
     Copyright (c) 2003 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: jbig2_metadata.c,v 1.2 2003/03/05 03:32:41 giles Exp $
 */
--- a/jbig2_metadata.h
+++ b/jbig2_metadata.h
@@ -3,10 +3,15 @@
     
     Copyright (c) 2003 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: jbig2_metadata.h,v 1.2 2003/03/05 03:32:41 giles Exp $
 */
--- a/jbig2_mmr.c
+++ b/jbig2_mmr.c
@@ -3,10 +3,15 @@
     
     Copyright (C) 2001-2003 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+    
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: jbig2_mmr.c,v 1.12 2003/02/05 15:27:42 giles Exp $
 */
--- a/jbig2_mmr.h
+++ b/jbig2_mmr.h
@@ -1,3 +1,21 @@
+/*
+    jbig2dec
+
+    Copyright (c) 2001 artofcode LLC.
+
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
+
+    $Id: $
+*/
+
 int
 jbig2_decode_generic_mmr(Jbig2Ctx *ctx,
 			 Jbig2Segment *segment,
--- a/jbig2_page.c
+++ b/jbig2_page.c
@@ -3,11 +3,16 @@
     
     Copyright (c) 2001-2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
+
     $Id: jbig2_page.c,v 1.15 2002/08/15 14:54:45 giles Exp $
 */
 
@@ -247,4 +252,4 @@
     jbig2_error(ctx, JBIG2_SEVERITY_WARNING, -1,
         "jbig2_release_page called on unknown page");
     return 1;
-}
\ No newline at end of file
+}
--- a/jbig2_priv.h
+++ b/jbig2_priv.h
@@ -3,10 +3,15 @@
     
     Copyright (c) 2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
         
     $Id: jbig2_priv.h,v 1.16 2002/08/05 22:47:53 giles Exp $
     
--- a/jbig2_segment.c
+++ b/jbig2_segment.c
@@ -3,10 +3,15 @@
     
     Copyright (c) 2002-2003 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: jbig2_segment.c,v 1.23 2003/03/10 14:44:01 giles Exp $
 */
--- a/jbig2_symbol_dict.c
+++ b/jbig2_symbol_dict.c
@@ -3,11 +3,16 @@
     
     Copyright (C) 2001-2003 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
+
     $Id: jbig2_symbol_dict.c,v 1.20 2003/03/05 12:25:54 giles Exp $
     
     symbol dictionary segment decode and support
@@ -153,7 +158,7 @@
             {
 	      /* todo: mem cleanup */
               code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
-                "Invalid SYMWIDTH value");
+                "Invalid SYMWIDTH value (%d) at symbol %d", SYMWIDTH, NSYMSDECODED+1);
               return NULL;
             }
 #ifdef DEBUG
@@ -300,10 +305,10 @@
 				  segment->data_length - offset,
 				  GB_stats);
 #ifdef DUMP_SYMDICT
-  jbig2_dump_symbol_dict(segment->result);
+  if (segment->result) jbig2_dump_symbol_dict(segment->result);
 #endif
 
-  return 0;
+  return (segment->result != NULL) ? 0 : -1;
 
   /* todo: retain or free GB_stats */
   
--- a/jbig2_symbol_dict.h
+++ b/jbig2_symbol_dict.h
@@ -3,10 +3,15 @@
     
     Copyright (C) 2001-2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: jbig2_symbol_dict.h,v 1.4 2002/06/22 21:20:38 giles Exp $
 
--- a/jbig2_text.c
+++ b/jbig2_text.c
@@ -3,10 +3,15 @@
     
     Copyright (C) 2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: jbig2_text.c,v 1.22 2003/03/05 14:29:35 giles Exp $
 */
--- a/jbig2dec.c
+++ b/jbig2dec.c
@@ -3,10 +3,15 @@
     
     Copyright (C) 2001-2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: jbig2dec.c,v 1.41 2002/08/15 14:54:45 giles Exp $
 */
--- a/memcmp.c
+++ b/memcmp.c
@@ -3,10 +3,15 @@
     
     Copyright (C) 2001-2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: memcmp.c,v 1.1 2002/08/05 17:10:44 giles Exp $
 */
--- a/os_types.h
+++ b/os_types.h
@@ -3,10 +3,15 @@
     
     Copyright (c) 2003 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
         
     $Id: os_types.h,v 1.1 2002/07/20 17:23:15 giles Exp $
 */
--- a/pbm2png.c
+++ b/pbm2png.c
@@ -3,10 +3,15 @@
     
     Copyright (C) 2002 artofcode LLC.
     
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                                
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id: pbm2png.c,v 1.3 2002/07/08 14:54:02 giles Exp $
 */