shithub: jbig2

Download patch

ref: 69b79684b3f800c7e22dcd16a1fd28a33d067e92
parent: acf706d0e91ebcf8b3d73c83d168af6e2de05a25
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Fri Jun 21 18:54:03 EDT 2002

remove dead code


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

--- a/jbig2_symbol_dict.c
+++ b/jbig2_symbol_dict.c
@@ -8,7 +8,7 @@
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.
 
-    $Id: jbig2_symbol_dict.c,v 1.5 2002/06/20 15:42:48 giles Exp $
+    $Id: jbig2_symbol_dict.c,v 1.6 2002/06/21 22:54:03 giles Exp $
 */
 
 #include <stddef.h>
@@ -21,85 +21,6 @@
 #include "jbig2_generic.h"
 #include "jbig2_symbol_dict.h"
 
-#ifdef GILES
-
-struct _Jbig2SymbolDictionary {
-  int16 flags;
-  int8 SDAT_flags[8];
-  byte SDRAT_flags[4];
-  int32 SDNUMEXSYMS;
-  int32 SDNUMNEWSYMS;
-};
-
-/* parse the symbol dictionary starting at ctx->offset
-   a pointer to a new Jbig2SymbolDictionary struct is returned
-
-   the ctx->offset pointer is not advanced; the caller must
-   take care of that, using the data_length field of the
-   segment header.
-*/
-static Jbig2SymbolDictionary *
-jbig2_read_symbol_dictionary (Jbig2Ctx_foo *ctx)
-{
-  Jbig2SymbolDictionary *result = (Jbig2SymbolDictionary *)malloc(sizeof(Jbig2SymbolDictionary));
-  int offset = ctx->offset;
-  bool SDHUFF, SDREFAGG, SDRTEMPLATE;
-  int SDTEMPLATE;
-  int sdat_bytes;
-
-  /* 7.4.2.1.1 */
-  result->flags = get_int16(ctx, offset);
-  offset += 2;
-
-  SDHUFF = result->flags & 1;
-  SDREFAGG = (result->flags >> 1) & 1;
-  SDTEMPLATE = (result->flags >> 10) & 3;
-  SDRTEMPLATE = (result->flags >> 12) & 1;
-
-  /* FIXME: there are quite a few of these conditions to check */
-  /* maybe #ifdef CONFORMANCE and a separate routine */
-  if(!SDHUFF && (result->flags & 0x0006)) {
-	printf("warning: SDHUFF is zero, but contrary to spec SDHUFFDH is not.\n");
-  }
-  if(!SDHUFF && (result->flags & 0x0018)) {
-	printf("warning: SDHUFF is zero, but contrary to spec SDHUFFDW is not.\n");
-  }
-
-  /* 7.4.2.1.2 - Symbol dictionary AT flags */
-  if (!SDHUFF)
-    {
-      int SDTEMPLATE = (result->flags >> 10) & 3;
-      if (SDTEMPLATE == 0)
-	sdat_bytes = 8;
-      else
-	sdat_bytes = 2;
-    }
-  else
-    sdat_bytes = 0;
-  get_bytes(ctx, result->SDAT_flags, sdat_bytes, offset);
-  memset(&result->SDAT_flags + sdat_bytes, 0, 8 - sdat_bytes);
-  offset += sdat_bytes;
-
-  /* 7.4.2.1.3 - Symbol dictionary refinement AT flags */
-  if (SDREFAGG && !SDRTEMPLATE)
-    {
-      get_bytes(ctx, result->SDRAT_flags, 4, offset);
-      offset += 4;
-    }
-
-  /* 7.4.2.1.4 */
-  result->SDNUMEXSYMS = get_int32(ctx, offset);
-
-  /* 7.4.2.1.5 */
-  result->SDNUMNEWSYMS = get_int32(ctx, offset + 4);
-  offset += 8;
-
-  /* hardwire for the first annex-h example */
-  
-  return result;
-}
-
-#endif /* GILES */
 
 /* Table 13 */
 typedef struct {