shithub: jbig2

Download patch

ref: c744e7207254f6719eb011a3a0b4984fdfa369dd
parent: e4e8acebad09764a3be793082de99bd1679ef0c0
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Fri May 16 19:48:20 EDT 2008

Clean up trailing whitespace.


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

--- a/jbig2.c
+++ b/jbig2.c
@@ -1,27 +1,27 @@
 /*
     jbig2dec
-    
+
     Copyright (C) 2002-2005 Artifex Software, Inc.
-    
+
     This software is provided AS-IS with no warranty,
     either express or implied.
-   
-    This software is distributed under license and may not 
+
+    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, 
+
+    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$
 */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif 
+#endif
 #include "os_types.h"
 
 #include <stdio.h>
@@ -79,7 +79,7 @@
 }
 
 static int
-jbig2_default_error(void *data, const char *msg, 
+jbig2_default_error(void *data, const char *msg,
                     Jbig2Severity severity, int32_t seg_idx)
 {
     /* report only fatal errors by default */
@@ -89,7 +89,7 @@
         fprintf(stderr, "\n");
         fflush(stderr);
     }
-    
+
     return 0;
 }
 
@@ -133,7 +133,7 @@
                     JBIG2_SEVERITY_FATAL, -1);
     return result;
   }
-  
+
   result->allocator = allocator;
   result->options = options;
   result->global_ctx = (const Jbig2Ctx *)global_ctx;
@@ -145,7 +145,7 @@
     JBIG2_FILE_HEADER;
 
   result->buf = NULL;
-  
+
   result->n_segments = 0;
   result->n_segments_max = 16;
   result->segments = (Jbig2Segment **)jbig2_alloc(allocator, result->n_segments_max * sizeof(Jbig2Segment *));
@@ -219,7 +219,7 @@
 	{
 	  byte *buf;
 	  size_t buf_size = initial_buf_size;
-	  
+
 	  do
 	    buf_size <<= 1;
 	  while (buf_size < ctx->buf_wr_ix - ctx->buf_rd_ix + size);
@@ -285,7 +285,7 @@
 	    }
 	  else
 	    {
-	      ctx->state = JBIG2_FILE_RANDOM_HEADERS; 
+	      ctx->state = JBIG2_FILE_RANDOM_HEADERS;
               jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, -1, "file header indicates random-access organization");
 
             }
--- a/jbig2_arith.c
+++ b/jbig2_arith.c
@@ -1,16 +1,16 @@
 /*
     jbig2dec
-    
+
     Copyright (C) 2001-2005 Artifex Software, Inc.
-    
+
     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,
@@ -385,7 +385,7 @@
 #ifdef JBIG2_DEBUG_ARITH
       fprintf(stderr, "%3d: D = %d, ", i, D);
       jbig2_arith_trace (as, cx);
-#endif      
+#endif
     }
 
   jbig2_free(ctx->allocator, as);
--- a/jbig2_arith_int.c
+++ b/jbig2_arith_int.c
@@ -1,21 +1,21 @@
 /*
     jbig2dec
-                                                                                
+
     Copyright (C) 2001 Artifex Software, Inc.
-                                                                                
+
     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$
 */
 
@@ -23,7 +23,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif 
+#endif
 #include "os_types.h"
 
 #include <stddef.h>
--- a/jbig2_generic.c
+++ b/jbig2_generic.c
@@ -1,21 +1,21 @@
 /*
     jbig2dec
-    
+
     Copyright (C) 2002-2005 Artifex Software, Inc.
-    
+
     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$
 */
 
@@ -25,7 +25,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif 
+#endif
 #include "os_types.h"
 
 #include <stddef.h>
@@ -602,7 +602,7 @@
   jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
     "allocated %d x %d image buffer for region decode results",
         rsi.width, rsi.height);
-    
+
   if (params.MMR)
     {
       code = jbig2_decode_generic_mmr(ctx, segment, &params,
@@ -627,10 +627,10 @@
       jbig2_free(ctx->allocator, GB_stats);
     }
 
-  jbig2_page_add_result(ctx, &ctx->pages[ctx->current_page], 
+  jbig2_page_add_result(ctx, &ctx->pages[ctx->current_page],
 			image, rsi.x, rsi.y, JBIG2_COMPOSE_OR);
   jbig2_image_release(ctx, image);
-  
+
   return code;
 }
 
--- a/jbig2_image.c
+++ b/jbig2_image.c
@@ -1,13 +1,13 @@
 /*
     jbig2dec
-    
+
     Copyright (C) 2001-2005 Artifex Software, Inc.
-    
+
     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,
@@ -18,7 +18,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif 
+#endif
 #include "os_types.h"
 
 #include <stdio.h>
@@ -35,7 +35,7 @@
 {
 	Jbig2Image	*image;
 	int		stride;
-	
+
 	image = (Jbig2Image *)jbig2_alloc(ctx->allocator, sizeof(*image));
 	if (image == NULL) {
 		jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1,
@@ -42,7 +42,7 @@
 			       "could not allocate image structure");
 		return NULL;
 	}
-	
+
 	stride = ((width - 1) >> 3) + 1; /* generate a byte-aligned stride */
 	image->data = (uint8_t *)jbig2_alloc(ctx->allocator, stride*height);
 	if (image->data == NULL) {
@@ -82,7 +82,7 @@
 }
 
 /* resize a Jbig2Image */
-Jbig2Image *jbig2_image_resize(Jbig2Ctx *ctx, Jbig2Image *image, 
+Jbig2Image *jbig2_image_resize(Jbig2Ctx *ctx, Jbig2Image *image,
 				int width, int height)
 {
 	if (width == image->width) {
@@ -178,7 +178,7 @@
 }
 
 /* composite one jbig2_image onto another */
-int jbig2_image_compose(Jbig2Ctx *ctx, Jbig2Image *dst, Jbig2Image *src, 
+int jbig2_image_compose(Jbig2Ctx *ctx, Jbig2Image *dst, Jbig2Image *src,
 			int x, int y, Jbig2ComposeOp op)
 {
     int i, j;
@@ -188,7 +188,7 @@
     uint8_t *s, *ss;
     uint8_t *d, *dd;
     uint8_t mask, rightmask;
-    
+
     if (op != JBIG2_COMPOSE_OR) {
 	/* hand off the the general routine */
 	return jbig2_image_compose_unopt(ctx, dst, src, x, y, op);
@@ -200,15 +200,15 @@
     ss = src->data;
     /* FIXME: this isn't sufficient for the < 0 cases */
     if (x < 0) { w += x; x = 0; }
-    if (y < 0) { h += y; y = 0; } 
+    if (y < 0) { h += y; y = 0; }
     w = (x + w < dst->width) ? w : dst->width - x;
     h = (y + h < dst->height) ? h : dst->height - y;
-#ifdef JBIG2_DEBUG    
+#ifdef JBIG2_DEBUG
     jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, -1,
       "composting %dx%d at (%d, %d) afer clipping\n",
         w, h, x, y);
 #endif
-    
+
 #if 0
     /* special case complete/strip replacement */
     /* disabled because it's only safe to do when the destination
@@ -222,8 +222,8 @@
     leftbyte = x >> 3;
     rightbyte = (x + w - 1) >> 3;
     shift = x & 7;
-    
-    /* general OR case */    
+
+    /* general OR case */
     s = ss;
     d = dd = dst->data + y*dst->stride + leftbyte;
     if (leftbyte == rightbyte) {
@@ -264,7 +264,7 @@
 	    s = (ss += src->stride);
 	}
     }
-            
+
     return 0;
 }
 
@@ -290,7 +290,7 @@
 
   if ((x < 0) || (x >= w)) return 0;
   if ((y < 0) || (y >= h)) return 0;
-  
+
   return ((image->data[byte]>>bit) & 1);
 }
 
--- a/jbig2_mmr.c
+++ b/jbig2_mmr.c
@@ -18,7 +18,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif 
+#endif
 #include "os_types.h"
 
 #include <stddef.h>
--- a/jbig2_page.c
+++ b/jbig2_page.c
@@ -1,13 +1,13 @@
 /*
     jbig2dec
-    
+
     Copyright (C) 2001-2005 Artifex Software, Inc.
-    
+
     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,
@@ -18,7 +18,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif 
+#endif
 #include "os_types.h"
 
 #include <stdlib.h>
@@ -76,7 +76,7 @@
         jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
             "unexpected page info segment, marking previous page finished");
     }
-        
+
     /* find a free page */
     {
         int index, j;
@@ -101,17 +101,17 @@
         page->state = JBIG2_PAGE_NEW;
         page->number = segment->page_association;
     }
-    
+
     /* FIXME: would be nice if we tried to work around this */
     if (segment->data_length < 19) {
         return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
             "segment too short");
     }
-    
+
     /* 7.4.8.x */
     page->width = jbig2_get_int32(segment_data);
     page->height = jbig2_get_int32(segment_data + 4);
-    
+
     page->x_resolution = jbig2_get_int32(segment_data + 8);
     page->y_resolution = jbig2_get_int32(segment_data + 12);
     page->flags = segment_data[16];
@@ -133,12 +133,12 @@
         page->striped = TRUE;
     }
     page->end_row = 0;
-    
+
     if (segment->data_length > 19) {
         jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
             "extra data in segment");
     }
-    
+
     dump_page_info(ctx, segment, page);
 
     /* allocate an approprate page image buffer */
@@ -160,7 +160,7 @@
             page->image->width, page->image->height,
             page->image->stride*page->image->height);
     }
-    
+
     return 0;
 }
 
@@ -177,13 +177,13 @@
     if (end_row < page.end_row) {
 	jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
 	    "end of stripe segment with non-positive end row advance"
-	    "(new end row %d vs current end row %d)", 
+	    "(new end row %d vs current end row %d)",
 	    end_row, page.end_row);
     } else {
 	jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number,
 	    "end of stripe: advancing end row to %d", end_row);
     }
-    
+
     page.end_row = end_row;
 
     return 0;
@@ -194,7 +194,7 @@
  *
  * called upon seeing an 'end of page' segment, this routine
  * marks a page as completed so it can be returned.
- * compositing will have already happened in the previous 
+ * compositing will have already happened in the previous
  * segment handlers.
  **/
 int
@@ -218,12 +218,12 @@
             "end of page marker for page %d doesn't match current page number %d",
             segment->page_association, page_number);
     }
-    
+
     jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number,
         "end of page %d", page_number);
 
     jbig2_complete_page(ctx);
-    
+
 #ifdef OUTPUT_PBM
     jbig2_image_write_pbm(ctx->pages[ctx->current_page].image, stdout);
 #endif
@@ -251,7 +251,7 @@
 	    jbig2_image_resize(ctx, page->image,
 		page->image->width, new_height);
 	}
-    }    
+    }
 
     jbig2_image_compose(ctx, page->image, image,
                         x, y + page->end_row, JBIG2_COMPOSE_OR);
@@ -284,7 +284,7 @@
             return ctx->pages[index].image;
         }
     }
-    
+
     /* no pages available */
     return NULL;
 }
@@ -295,7 +295,7 @@
 int jbig2_release_page(Jbig2Ctx *ctx, Jbig2Image *image)
 {
     int index;
-    
+
     /* find the matching page struct and mark it released */
     for (index = 0; index < ctx->max_page_index; index++) {
         if (ctx->pages[index].image == image) {
@@ -306,7 +306,7 @@
             return 0;
         }
     }
-    
+
     /* no matching pages */
     jbig2_error(ctx, JBIG2_SEVERITY_WARNING, -1,
         "jbig2_release_page called on unknown page");
--- a/jbig2_refinement.c
+++ b/jbig2_refinement.c
@@ -1,21 +1,21 @@
 /*
     jbig2dec
-    
+
     Copyright (C) 2004 Artifex Software, Inc.
-    
+
     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$
 */
 
@@ -25,7 +25,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif 
+#endif
 #include "os_types.h"
 
 #include <stddef.h>
@@ -72,11 +72,11 @@
   for (y = 0; y < GRH; y++) {
     for (x = 0; x < GRW; x++) {
       CONTEXT = 0;
-      CONTEXT |= jbig2_image_get_pixel(image, x - 1, y + 0) << 0; 
-      CONTEXT |= jbig2_image_get_pixel(image, x + 1, y - 1) << 1; 
-      CONTEXT |= jbig2_image_get_pixel(image, x + 0, y - 1) << 2; 
-      CONTEXT |= jbig2_image_get_pixel(image, x + params->grat[0], 
-	y + params->grat[1]) << 3; 
+      CONTEXT |= jbig2_image_get_pixel(image, x - 1, y + 0) << 0;
+      CONTEXT |= jbig2_image_get_pixel(image, x + 1, y - 1) << 1;
+      CONTEXT |= jbig2_image_get_pixel(image, x + 0, y - 1) << 2;
+      CONTEXT |= jbig2_image_get_pixel(image, x + params->grat[0],
+	y + params->grat[1]) << 3;
       CONTEXT |= jbig2_image_get_pixel(ref, x-dx+1, y-dy+1) << 4;
       CONTEXT |= jbig2_image_get_pixel(ref, x-dx+0, y-dy+1) << 5;
       CONTEXT |= jbig2_image_get_pixel(ref, x-dx-1, y-dy+1) << 6;
@@ -85,7 +85,7 @@
       CONTEXT |= jbig2_image_get_pixel(ref, x-dx-1, y-dy+0) << 9;
       CONTEXT |= jbig2_image_get_pixel(ref, x-dx+1, y-dy-1) << 10;
       CONTEXT |= jbig2_image_get_pixel(ref, x-dx+0, y-dy-1) << 11;
-      CONTEXT |= jbig2_image_get_pixel(ref, x-dx+params->grat[2], 
+      CONTEXT |= jbig2_image_get_pixel(ref, x-dx+params->grat[2],
 	y-dy+params->grat[3]) << 12;
       bit = jbig2_arith_decode(as, &GR_stats[CONTEXT]);
       jbig2_image_set_pixel(image, x, y, bit);
@@ -127,10 +127,10 @@
   for (y = 0; y < GRH; y++) {
     for (x = 0; x < GRW; x++) {
       CONTEXT = 0;
-      CONTEXT |= jbig2_image_get_pixel(image, x - 1, y + 0) << 0; 
-      CONTEXT |= jbig2_image_get_pixel(image, x + 1, y - 1) << 1; 
-      CONTEXT |= jbig2_image_get_pixel(image, x + 0, y - 1) << 2; 
-      CONTEXT |= jbig2_image_get_pixel(image, x - 1, y - 1) << 3; 
+      CONTEXT |= jbig2_image_get_pixel(image, x - 1, y + 0) << 0;
+      CONTEXT |= jbig2_image_get_pixel(image, x + 1, y - 1) << 1;
+      CONTEXT |= jbig2_image_get_pixel(image, x + 0, y - 1) << 2;
+      CONTEXT |= jbig2_image_get_pixel(image, x - 1, y - 1) << 3;
       CONTEXT |= jbig2_image_get_pixel(ref, x-dx+1, y-dy+1) << 4;
       CONTEXT |= jbig2_image_get_pixel(ref, x-dx+0, y-dy+1) << 5;
       CONTEXT |= jbig2_image_get_pixel(ref, x-dx+1, y-dy+0) << 6;
@@ -197,9 +197,9 @@
       const int minor_width = GRW - x > 8 ? 8 : GRW - x;
 
       if (y >= 1) {
-	line_m1 = (line_m1 << 8) | 
+	line_m1 = (line_m1 << 8) |
 	  (x + 8 < GRW ? grreg_line[-stride + (x >> 3) + 1] : 0);
-	refline_m1 = (refline_m1 << 8) | 
+	refline_m1 = (refline_m1 << 8) |
 	  (x + 8 < GRW ? grref_line[-refstride + (x >> 3) + 1] << 2 : 0);
       }
 
@@ -275,7 +275,7 @@
     return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
         "decode_refinement_region: typical prediction coding NYI");
   if (params->GRTEMPLATE)
-    return jbig2_decode_refinement_template1_unopt(ctx, segment, params, 
+    return jbig2_decode_refinement_template1_unopt(ctx, segment, params,
                                              as, image, GR_stats);
   else
     return jbig2_decode_refinement_template0_unopt(ctx, segment, params,
@@ -294,7 +294,7 @@
   int index;
 
   for (index = 0; index < nsegments; index++) {
-    rsegment = jbig2_find_segment(ctx, 
+    rsegment = jbig2_find_segment(ctx,
       segment->referred_to_segments[index]);
     if (rsegment == NULL) {
       jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
@@ -317,7 +317,7 @@
   return NULL;
 }
 
-/** 
+/**
  * Handler for generic refinement region segments
  */
 int
@@ -328,7 +328,7 @@
   Jbig2RegionSegmentInfo rsi;
   int offset = 0;
   byte seg_flags;
-  
+
   /* 7.4.7 */
   if (segment->data_length < 18)
     return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
@@ -362,7 +362,7 @@
     params.grat[2] = segment_data[offset + 2];
     params.grat[3] = segment_data[offset + 3];
     jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number,
-                   "grat1: (%d, %d) grat2: (%d, %d)", 
+                   "grat1: (%d, %d) grat2: (%d, %d)",
                    params.grat[0], params.grat[1],
                    params.grat[2], params.grat[3]);
     offset += 4;
@@ -376,7 +376,7 @@
     if (ref == NULL)
       return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
         "could not find reference bitmap!");
-    /* the reference bitmap is the result of a previous 
+    /* the reference bitmap is the result of a previous
        intermediate region segment; the reference selection
        rules say to use the first one available, and not to
        reuse any intermediate result, so we simply clone it
@@ -388,7 +388,7 @@
       "found reference bitmap in segment %d", ref->number);
   } else {
     /* the reference is just (a subset of) the page buffer */
-    params.reference = jbig2_image_clone(ctx, 
+    params.reference = jbig2_image_clone(ctx,
       ctx->pages[ctx->current_page].image);
     /* TODO: subset the image if appropriate */
   }
--- a/jbig2_segment.c
+++ b/jbig2_segment.c
@@ -1,13 +1,13 @@
 /*
     jbig2dec
-    
+
     Copyright (C) 2002-2005 Artifex Software, Inc.
-    
+
     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,
@@ -18,7 +18,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif 
+#endif
 #include "os_types.h"
 
 #include <stddef.h> /* size_t */
@@ -75,12 +75,12 @@
   pa_size = result->flags & 0x40 ? 4 : 1; /* 7.2.6 */
   if (offset + referred_to_segment_count*referred_to_segment_size + pa_size + 4 > buf_size)
     {
-      jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, result->number, 
+      jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, result->number,
         "jbig2_parse_segment_header() called with insufficient data", -1);
       jbig2_free (ctx->allocator, result);
       return NULL;
     }
-    
+
   /* 7.2.5 */
   if (referred_to_segment_count)
     {
@@ -87,9 +87,9 @@
       int i;
 
       referred_to_segments = jbig2_alloc(ctx->allocator, referred_to_segment_count * referred_to_segment_size * sizeof(uint32_t));
-    
+
       for (i = 0; i < referred_to_segment_count; i++) {
-        referred_to_segments[i] = 
+        referred_to_segments[i] =
           (referred_to_segment_size == 1) ? buf[offset] :
           (referred_to_segment_size == 2) ? jbig2_get_int16(buf+offset) :
             jbig2_get_int32(buf + offset);
@@ -104,7 +104,7 @@
     {
       result->referred_to_segments = NULL;
     }
-  
+
   /* 7.2.6 */
   if (result->flags & 0x40) {
 	result->page_association = jbig2_get_int32(buf + offset);
@@ -115,7 +115,7 @@
   jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, result->number,
   	"segment %d is associated with page %d",
   	result->number, result->page_association);
-  	
+
   /* 7.2.7 */
   result->data_length = jbig2_get_int32(buf + offset);
   *p_header_size = offset + 4;
@@ -165,12 +165,12 @@
     for (index = index_max; index >= 0; index--)
         if (ctx->segments[index]->number == number)
             return (ctx->segments[index]);
-        
+
     if (global_ctx)
 	for (index = global_ctx->segment_index - 1; index >= 0; index--)
 	    if (global_ctx->segments[index]->number == number)
 		return (global_ctx->segments[index]);
-    
+
     /* didn't find a match */
     return NULL;
 }
@@ -197,7 +197,7 @@
     bool reserved, dependent, necessary;
 
     type = jbig2_get_int32(segment_data);
-    
+
     reserved = type & 0x20000000;
     dependent = type & 0x40000000;
     necessary = type & 0x80000000;
@@ -206,7 +206,7 @@
         jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
             "extension segment is marked 'necessary' but not 'reservered' contrary to spec");
     }
-    
+
     switch (type) {
         case 0x20000000: return jbig2_parse_comment_ascii(ctx, segment, segment_data);
         case 0x20000002: return jbig2_parse_comment_unicode(ctx, segment, segment_data);
@@ -219,7 +219,7 @@
                     "unhandled extension segment");
             }
     }
-    
+
     return 0;
 }
 
--- a/jbig2_symbol_dict.c
+++ b/jbig2_symbol_dict.c
@@ -1,13 +1,13 @@
 /*
     jbig2dec
-    
+
     Copyright (C) 2001-2005 Artifex Software, Inc.
-    
+
     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,
@@ -14,13 +14,13 @@
     San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
     $Id$
-    
+
     symbol dictionary segment decode and support
 */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif 
+#endif
 #include "os_types.h"
 
 #include <stddef.h>
@@ -70,12 +70,12 @@
     Jbig2SymbolDict *dict = (Jbig2SymbolDict *)segment->result;
     int index;
     char filename[24];
-    
+
     if (dict == NULL) return;
     jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number,
         "dumping symbol dict as %d individual png files\n", dict->n_symbols);
     for (index = 0; index < dict->n_symbols; index++) {
-        snprintf(filename, sizeof(filename), "symbol_%02d-%04d.png", 
+        snprintf(filename, sizeof(filename), "symbol_%02d-%04d.png",
 		segment->number, index);
 	jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
 	  "dumping symbol %d/%d as '%s'", index, dict->n_symbols, filename);
@@ -93,7 +93,7 @@
 jbig2_sd_new(Jbig2Ctx *ctx, int n_symbols)
 {
    Jbig2SymbolDict *new = NULL;
-   
+
    new = (Jbig2SymbolDict *)jbig2_alloc(ctx->allocator,
    				sizeof(Jbig2SymbolDict));
    if (new != NULL) {
@@ -110,7 +110,7 @@
      jbig2_free(ctx->allocator, new);
      return NULL;
    }
-   
+
    return new;
 }
 
@@ -119,7 +119,7 @@
 jbig2_sd_release(Jbig2Ctx *ctx, Jbig2SymbolDict *dict)
 {
    int i;
-   
+
    if (dict == NULL) return;
    for (i = 0; i < dict->n_symbols; i++)
      if (dict->glyphs[i]) jbig2_image_release(ctx, dict->glyphs[i]);
@@ -142,12 +142,12 @@
     int index;
     Jbig2Segment *rsegment;
     int n_dicts = 0;
- 
+
     for (index = 0; index < segment->referred_to_segment_count; index++) {
         rsegment = jbig2_find_segment(ctx, segment->referred_to_segments[index]);
         if (rsegment && ((rsegment->flags & 63) == 0)) n_dicts++;
     }
-                                                                                
+
     return (n_dicts);
 }
 
@@ -160,7 +160,7 @@
     Jbig2SymbolDict **dicts;
     int n_dicts = jbig2_sd_count_referred(ctx, segment);
     int dindex = 0;
-                                                     
+
     dicts = jbig2_alloc(ctx->allocator, sizeof(Jbig2SymbolDict *) * n_dicts);
     for (index = 0; index < segment->referred_to_segment_count; index++) {
         rsegment = jbig2_find_segment(ctx, segment->referred_to_segments[index]);
@@ -169,7 +169,7 @@
             dicts[dindex++] = (Jbig2SymbolDict *)rsegment->result;
         }
     }
-                                                                                
+
     if (dindex != n_dicts) {
         /* should never happen */
         jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
@@ -176,11 +176,11 @@
             "counted %d symbol dictionaries but build a list with %d.\n",
             n_dicts, dindex);
     }
-                                                                                
+
     return (dicts);
 }
 
-/* generate a new symbol dictionary by concatenating a list of 
+/* generate a new symbol dictionary by concatenating a list of
    existing dictionaries */
 Jbig2SymbolDict *
 jbig2_sd_cat(Jbig2Ctx *ctx, int n_dicts, Jbig2SymbolDict **dicts)
@@ -187,7 +187,7 @@
 {
   int i,j,k, symbols;
   Jbig2SymbolDict *new = NULL;
-  
+
   /* count the imported symbols and allocate a new array */
   symbols = 0;
   for(i = 0; i < n_dicts; i++)
@@ -201,7 +201,7 @@
       for (j = 0; j < dicts[i]->n_symbols; j++)
         new->glyphs[k++] = jbig2_image_clone(ctx, dicts[i]->glyphs[j]);
   }
-  
+
   return new;
 }
 
@@ -311,7 +311,7 @@
 #ifdef JBIG2_DEBUG
       jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
         "HCHEIGHT = %d", HCHEIGHT);
-#endif        
+#endif
       jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
         "decoding height class %d with %d syms decoded", HCHEIGHT, NSYMSDECODED);
 
@@ -374,7 +374,7 @@
 		  code = jbig2_decode_generic_region(ctx, segment, &region_params,
 						     as, image, GB_stats);
 		  /* todo: handle errors */
-                  
+
                   SDNEWSYMS->glyphs[NSYMSDECODED] = image;
 
 	      } else {
@@ -399,7 +399,7 @@
 		      Jbig2Image *image;
 		      int i;
 
-		      if (tparams == NULL) 
+		      if (tparams == NULL)
 		      {
 			  /* First time through, we need to initialise the */
 			  /* various tables for Huffman or adaptive encoding */
@@ -438,7 +438,7 @@
 			      tparams->IADS = jbig2_arith_int_ctx_new(ctx);
 			      tparams->IAIT = jbig2_arith_int_ctx_new(ctx);
 			      /* Table 31 */
-			      for (SBSYMCODELEN = 0; (1 << SBSYMCODELEN) < 
+			      for (SBSYMCODELEN = 0; (1 << SBSYMCODELEN) <
 				  (int)(params->SDNUMINSYMS + params->SDNUMNEWSYMS); SBSYMCODELEN++);
 			      tparams->IAID = jbig2_arith_iaid_ctx_new(ctx, SBSYMCODELEN);
 			      tparams->IARI = jbig2_arith_int_ctx_new(ctx);
@@ -514,7 +514,7 @@
 			  "refinement references unknown symbol %d", ID);
 			return NULL;
 		      }
-   
+
 		      jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
 			"symbol is a refinement of id %d with the refinement applied at (%d,%d)",
 			ID, RDX, RDY);
@@ -523,7 +523,7 @@
 
 		      /* Table 18 */
 		      rparams.GRTEMPLATE = params->SDRTEMPLATE;
-		      rparams.reference = (ID < ninsyms) ? 
+		      rparams.reference = (ID < ninsyms) ?
 					params->SDINSYMS->glyphs[ID] :
 					SDNEWSYMS->glyphs[ID-ninsyms];
 		      rparams.DX = RDX;
@@ -530,7 +530,7 @@
 		      rparams.DY = RDY;
 		      rparams.TPGRON = 0;
 		      memcpy(rparams.grat, params->sdrat, 4);
-		      jbig2_decode_refinement_region(ctx, segment, 
+		      jbig2_decode_refinement_region(ctx, segment,
 		          &rparams, as, image, GR_stats);
 
 		      SDNEWSYMS->glyphs[NSYMSDECODED] = image;
@@ -542,7 +542,7 @@
 		  {
 		    char name[64];
 		    FILE *out;
-		    snprintf(name, 64, "sd.%04d.%04d.pbm", 
+		    snprintf(name, 64, "sd.%04d.%04d.pbm",
 		             segment->number, NSYMSDECODED);
 		    out = fopen(name, "wb");
                     jbig2_image_write_pbm(SDNEWSYMS->glyphs[NSYMSDECODED], out);
@@ -558,7 +558,7 @@
 	  if (params->SDHUFF && !params->SDREFAGG) {
 	    SDNEWSYMWIDTHS[NSYMSDECODED] = SYMWIDTH;
 	  }
-	
+
 	  jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
             "decoded symbol %d of %d (%dx%d)",
 		NSYMSDECODED, params->SDNUMNEWSYMS,
@@ -597,7 +597,7 @@
 	if (BMSIZE == 0) {
 	  /* if BMSIZE == 0 bitmap is uncompressed */
 	  const byte *src = data + jbig2_huffman_offset(hs);
-	  const int stride = (image->width >> 3) + 
+	  const int stride = (image->width >> 3) +
 		((image->width & 7) ? 1 : 0);
 	  byte *dst = image->data;
 
@@ -638,10 +638,10 @@
 	for (j = HCFIRSTSYM; j < NSYMSDECODED; j++) {
 	  Jbig2Image *glyph;
 	  glyph = jbig2_image_new(ctx, SDNEWSYMWIDTHS[j], HCHEIGHT);
-	  jbig2_image_compose(ctx, glyph, image, 
+	  jbig2_image_compose(ctx, glyph, image,
 		-x, 0, JBIG2_COMPOSE_REPLACE);
 	  x += SDNEWSYMWIDTHS[j];
-	  SDNEWSYMS->glyphs[j] = glyph; 
+	  SDNEWSYMS->glyphs[j] = glyph;
 	}
 	jbig2_image_release(ctx, image);
       }
@@ -648,7 +648,7 @@
 
   } /* end of symbol decode loop */
 
-  if (tparams != NULL) 
+  if (tparams != NULL)
   {
       if (!params->SDHUFF)
       {
@@ -680,7 +680,7 @@
   }
 
   jbig2_free(ctx->allocator, GB_stats);
-  
+
   /* 6.5.10 */
   SDEXSYMS = jbig2_sd_new(ctx, params->SDNUMEXSYMS);
   {
@@ -688,7 +688,7 @@
     int j = 0;
     int k, m, exflag = 0;
     int32_t exrunlength;
-    
+
     if (params->SDINSYMS != NULL)
       m = params->SDINSYMS->n_symbols;
     else
@@ -709,9 +709,9 @@
         exflag = !exflag;
     }
   }
-  
+
   jbig2_sd_release(ctx, SDNEWSYMS);
-  
+
   if (!params->SDHUFF) {
       jbig2_arith_int_ctx_free(ctx, IADH);
       jbig2_arith_int_ctx_free(ctx, IADW);
@@ -722,7 +722,7 @@
         jbig2_arith_int_ctx_free(ctx, IARDX);
         jbig2_arith_int_ctx_free(ctx, IARDY);
       }
-      jbig2_free(ctx->allocator, as);  
+      jbig2_free(ctx->allocator, as);
   } else {
       if (params->SDREFAGG) {
 	jbig2_free(ctx->allocator, SDNEWSYMWIDTHS);
@@ -732,7 +732,7 @@
   }
 
   jbig2_word_stream_buf_free(ctx, ws);
-  
+
   return SDEXSYMS;
 }
 
@@ -747,7 +747,7 @@
   int offset;
   Jbig2ArithCx *GB_stats = NULL;
   Jbig2ArithCx *GR_stats = NULL;
-  
+
   if (segment->data_length < 10)
     goto too_short;
 
@@ -766,11 +766,11 @@
   if (params.SDHUFF) {
     switch ((flags & 0x000c) >> 2) {
       case 0: /* Table B.4 */
-	params.SDHUFFDH = jbig2_build_huffman_table(ctx, 
+	params.SDHUFFDH = jbig2_build_huffman_table(ctx,
 		                       &jbig2_huffman_params_D);
 	break;
       case 1: /* Table B.5 */
-	params.SDHUFFDH = jbig2_build_huffman_table(ctx, 
+	params.SDHUFFDH = jbig2_build_huffman_table(ctx,
 		                       &jbig2_huffman_params_E);
 	break;
       case 3: /* Custom table from referred segment */
@@ -785,11 +785,11 @@
     }
     switch ((flags & 0x0030) >> 4) {
       case 0: /* Table B.2 */
-	params.SDHUFFDW = jbig2_build_huffman_table(ctx, 
+	params.SDHUFFDW = jbig2_build_huffman_table(ctx,
 		                       &jbig2_huffman_params_B);
 	break;
       case 1: /* Table B.3 */
-	params.SDHUFFDW = jbig2_build_huffman_table(ctx, 
+	params.SDHUFFDW = jbig2_build_huffman_table(ctx,
 		                       &jbig2_huffman_params_C);
 	break;
       case 3: /* Custom table from referred segment */
@@ -811,7 +811,7 @@
 	params.SDHUFFBMSIZE = jbig2_build_huffman_table(ctx,
 					&jbig2_huffman_params_A);
     }
-    if (flags & 0x0080) { 
+    if (flags & 0x0080) {
         /* Custom table from referred segment */
 	return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
 	    "symbol dictionary uses custom REFAGG huffman table (NYI)");
@@ -833,7 +833,7 @@
       jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
 		  "SDHUFF is zero, but contrary to spec SDHUFFDW is not.");
     }
-  } 
+  }
 
   if (flags & 0x0080) {
       jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
@@ -853,7 +853,7 @@
       offset += 4;
   } else {
       /* sdrat is meaningless if SDRTEMPLATE is 1, but set a value
-         to avoid confusion if anybody looks */ 
+         to avoid confusion if anybody looks */
       memset(params.sdrat, 0, 4);
   }
 
@@ -874,8 +874,8 @@
   {
     int n_dicts = jbig2_sd_count_referred(ctx, segment);
     Jbig2SymbolDict **dicts = NULL;
-  
-    params.SDINSYMS = NULL;	
+
+    params.SDINSYMS = NULL;
     if (n_dicts > 0) {
       dicts = jbig2_sd_list_referred(ctx, segment);
       params.SDINSYMS = jbig2_sd_cat(ctx, n_dicts, dicts);
@@ -886,7 +886,7 @@
      params.SDNUMINSYMS = 0;
     }
   }
-  
+
   /* 7.4.2.2 (4) */
   if (!params.SDHUFF) {
       int stats_size = params.SDTEMPLATE == 0 ? 65536 :
--- a/jbig2_text.c
+++ b/jbig2_text.c
@@ -1,13 +1,13 @@
 /*
     jbig2dec
-    
+
     Copyright (C) 2002-2008 Artifex Software, Inc.
-    
+
     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,
@@ -18,7 +18,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif 
+#endif
 #include "os_types.h"
 
 #include <stddef.h>
@@ -79,7 +79,7 @@
     Jbig2HuffmanTable *SBSYMCODES = NULL;
     int code = 0;
     int RI;
-    
+
     SBNUMSYMS = 0;
     for (index = 0; index < n_dicts; index++) {
         SBNUMSYMS += dicts[index]->n_symbols;
@@ -86,7 +86,7 @@
     }
     jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
         "symbol list contains %d glyphs in %d dictionaries", SBNUMSYMS, n_dicts);
-    
+
     if (params->SBHUFF) {
 	Jbig2HuffmanTable *runcodes;
 	Jbig2HuffmanParams runcodeparams;
@@ -165,8 +165,8 @@
 	    range = SBNUMSYMS - index;
 	  }
 	  for (r = 0; r < range; r++) {
-	    symcodelengths[index+r].PREFLEN = len; 
-	    symcodelengths[index+r].RANGELEN = 0; 
+	    symcodelengths[index+r].PREFLEN = len;
+	    symcodelengths[index+r].RANGELEN = 0;
 	    symcodelengths[index+r].RANGELOW = index + r;
 	  }
 	  index += r;
@@ -198,7 +198,7 @@
 
     /* 6.4.5 (1) */
     jbig2_image_clear(ctx, image, params->SBDEFPIXEL);
-    
+
     /* 6.4.6 */
     if (params->SBHUFF) {
         STRIPT = jbig2_huffman_get(hs, params->SBHUFFDT, &code);
@@ -210,7 +210,7 @@
     STRIPT *= -(params->SBSTRIPS);
     FIRSTS = 0;
     NINSTANCES = 0;
-    
+
     /* 6.4.5 (3) */
     while (NINSTANCES < params->SBNUMINSTANCES) {
         /* (3b) */
@@ -221,7 +221,7 @@
         }
         DT *= params->SBSTRIPS;
         STRIPT += DT;
-       
+
 	first_symbol = TRUE;
 	/* 6.4.5 (3c) - decode symbols in strip */
 	for (;;) {
@@ -335,7 +335,7 @@
 		}
 
 	    }
-        
+
 	    /* (3c.vi) */
 	    if ((!params->TRANSPOSED) && (params->REFCORNER > 1)) {
 		CURS += IB->width - 1;
@@ -342,10 +342,10 @@
 	    } else if ((params->TRANSPOSED) && !(params->REFCORNER & 1)) {
 		CURS += IB->height - 1;
 	    }
-        
+
 	    /* (3c.vii) */
 	    S = CURS;
-        
+
 	    /* (3c.viii) */
 	    if (!params->TRANSPOSED) {
 		switch (params->REFCORNER) {  /* FIXME: double check offsets */
@@ -362,7 +362,7 @@
 		case JBIG2_CORNER_BOTTOMRIGHT: y = S - IB->width + 1; x = T - IB->height + 1; break;
 		}
 	    }
-        
+
 	    /* (3c.ix) */
 #ifdef JBIG2_DEBUG
 	    jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
@@ -371,7 +371,7 @@
 			params->SBNUMINSTANCES);
 #endif
 	    jbig2_image_compose(ctx, image, IB, x, y, params->SBCOMBOP);
-        
+
 	    /* (3c.x) */
 	    if ((!params->TRANSPOSED) && (params->REFCORNER < 2)) {
 		CURS += IB->width -1 ;
@@ -378,7 +378,7 @@
 	    } else if ((params->TRANSPOSED) && (params->REFCORNER & 1)) {
 		CURS += IB->height - 1;
 	    }
-        
+
 	    /* (3c.xi) */
 	    NINSTANCES++;
 
@@ -390,8 +390,8 @@
 
     if (params->SBHUFF) {
       jbig2_release_huffman_table(ctx, SBSYMCODES);
-    } 
-    
+    }
+
     return 0;
 }
 
@@ -411,15 +411,15 @@
     uint16_t huffman_flags = 0;
     Jbig2ArithCx *GR_stats = NULL;
     int code = 0;
-    Jbig2WordStream *ws = NULL; 
-    Jbig2ArithState *as = NULL; 
-    
+    Jbig2WordStream *ws = NULL;
+    Jbig2ArithState *as = NULL;
+
     /* 7.4.1 */
     if (segment->data_length < 17)
         goto too_short;
     jbig2_get_region_segment_info(&region_info, segment_data);
     offset += 17;
-    
+
     /* 7.4.3.1.1 */
     flags = jbig2_get_int16(segment_data + offset);
     offset += 2;
@@ -426,7 +426,7 @@
 
     jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
 	"text region header flags 0x%04x", flags);
-    
+
     params.SBHUFF = flags & 0x0001;
     params.SBREFINE = flags & 0x0002;
     params.LOGSBSTRIPS = (flags & 0x000c) >> 2;
@@ -450,7 +450,7 @@
         /* 7.4.3.1.2 */
         huffman_flags = jbig2_get_int16(segment_data + offset);
         offset += 2;
-        
+
         if (huffman_flags & 0x8000)
             jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
                 "reserved bit 15 of text region huffman flags is not zero");
@@ -467,14 +467,14 @@
             offset += 4;
 	  }
       }
-    
+
     /* 7.4.3.1.4 */
     params.SBNUMINSTANCES = jbig2_get_int32(segment_data + offset);
     offset += 4;
-    
+
     if (params.SBHUFF) {
         /* 7.4.3.1.5 - Symbol ID Huffman table */
-	/* ...this is handled in the segment body decoder */	
+	/* ...this is handled in the segment body decoder */
 
         /* 7.4.3.1.6 - Other Huffman table selection */
 	switch (huffman_flags & 0x0003) {
@@ -626,12 +626,12 @@
 		"text region uses custom RSIZE huffman table (NYI)");
 	    break;
 	}
-	
+
         if (huffman_flags & 0x8000) {
 	  jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
  	    "text region huffman flags bit 15 is set, contrary to spec");
 	}
-        
+
         /* 7.4.3.1.7 */
         /* For convenience this is done in the body decoder routine */
     }
@@ -640,7 +640,7 @@
         "text region: %d x %d @ (%d,%d) %d symbols",
         region_info.width, region_info.height,
         region_info.x, region_info.y, params.SBNUMINSTANCES);
-    
+
     /* 7.4.3.2 (2) - compose the list of symbol dictionaries */
     n_dicts = jbig2_sd_count_referred(ctx, segment);
     if (n_dicts != 0) {
@@ -656,7 +656,7 @@
     } else {
 	int index;
 	if (dicts[0] == NULL) {
-	    return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, 
+	    return jbig2_error(ctx, JBIG2_SEVERITY_WARNING,
 			segment->number,
                         "unable to find first referenced symbol dictionary!");
 	}
@@ -745,7 +745,7 @@
         segment->result = image;
     } else {
         /* otherwise composite onto the page */
-        jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number, 
+        jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
             "composing %dx%d decoded text region onto page at (%d, %d)",
             region_info.width, region_info.height, region_info.x, region_info.y);
 	jbig2_page_add_result(ctx, &ctx->pages[ctx->current_page], image,
@@ -752,10 +752,10 @@
 			      region_info.x, region_info.y, region_info.op);
         jbig2_image_release(ctx, image);
     }
-    
-    /* success */            
+
+    /* success */
     return 0;
-    
+
     too_short:
         return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
                     "Segment too short");