🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sources.bugs
1 messages
1 total messages Started by Cristy Mon, 21 Dec 1992 19:36
ImageMagick 2.2 - patch #1, Part 01/3
#657
Author: Cristy
Date: Mon, 21 Dec 1992 19:36
2374 lines
79171 bytes
Submitted-by: cristy@dupont.com
Archive-name: ImageMagick/patch0101

#!/bin/sh
# This is ImageMagick/patch01, a shell archive (produced by shar 3.49)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 12/21/1992 19:36 UTC by cristy@dupont.com
# Source directory /tmp_mnt/nfs/zeta/home/cristy/Archive/ImageMagick
#
# existing files will NOT be overwritten unless -c is specified
#
# This is part 1 of a multipart archive                                    
# do not concatenate these parts, unpack them in order with /bin/sh        
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
# 192865 -rw------- fix-01
#
if test -r _shar_seq_.tmp; then
	echo 'Must unpack archives in sequence!'
	echo Please unpack part `cat _shar_seq_.tmp` next
	exit 1
fi
# ============= fix-01 ==============
if test -f 'fix-01' -a X"$1" != X"-c"; then
	echo 'x - skipping fix-01 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting fix-01 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'fix-01' &&
X
X
X                    ImageMagick 2.2 Patch #1
X
To apply this patch:
X
cd to the top of the source tree (to the directory containing the
"ImageMagick" subdirectories) and do:
X
X  patch -p < ThisFile
X  cd ImageMagick
X  mv rotate.c shear.c
X
Prereq: ImageMagick 2.2 (posted from comp.sources.misc, Volume 34,
Issue 28).
X
Alternatively get the entire distribution as contrib/ImageMagick.tar.Z
on export.lcs.mit.edu.  I will post this patch to comp.sources.misc in
a few days.
X
X
diff -r -c ImageMagick/ChangeLog ImageMagick2.2.1/ChangeLog
*** ImageMagick/ChangeLog	Wed Dec  2 09:33:26 1992
--- ImageMagick2.2.1/ChangeLog	Mon Dec 21 14:12:35 1992
***************
*** 1,3 ****
--- 1,35 ----
+ ImageMagick 2.2.1
+ 
+   o The number of colors reported with the -verbose option was on
+     occasion incorrect.
+ 
+   o Color quantization was improved and in some cases sped up ~10%.
+ 
+   o Cleaned up image rotation code.
+ 
+   o Added -shear to mogrify options.
+ 
+   o Added a file type of HISTOGRAM to convert.
+ 
+   o Sometimes PBM image files did not have the correct number of bytes.
+ 
+   o Color reduced PPM images were being written at the full color resolution.
+ 
+   o Keypresses are no longer accepted during image configuration.
+ 
+   o Red, green, and blue values of a X constant image were set to the
+     red intensity of the background color.
+ 
+   o Clipped images did not show up correctly in the panning icon.
+ 
+   o `animate' no longer shows images out-of-order if the image scene number is
+     absent (thanks to kent@oddjob.uchicago.edu).
+ 
+   o ImageMagick now recognizes the X resource class with the first letter
+     of the client capitalized, i.e. 'Display.Visual: default' (thanks to
+     dws@ssec.wisc.edu).
+ 
+ 
X  ImageMagick 2.2
X  
X    o When displaying a composite MIFF image created with `montage',
***************
*** 17,22 ****
--- 49,57 ----
X    o Updated MIFF manual page to reflect 'montage' image header
X      keyword.
X  
+   o Add -colormap to `mogrify.'  Use to color reduce an image to
+     a set of colors you choose.
+ 
X    o Some compilers have read-only strings.   ImageMagick no longer
X      writes on read-only strings.
X  
***************
*** 57,64 ****
X    o Panning uses a pixmap for faster panning speed.
X  
X    o Rotate.c now uses a table to force range limits.
- 
-   o Fixed strcasecmp to work under VMS.
X  
X    o range table in quantize.c is allocated from the heap instead of
X      the stack.
--- 92,97 ----
diff -r -c ImageMagick/Imakefile ImageMagick2.2.1/Imakefile
*** ImageMagick/Imakefile	Wed Nov 25 14:22:24 1992
--- ImageMagick2.2.1/Imakefile	Fri Dec 18 17:07:44 1992
***************
*** 25,34 ****
X  
X  #include "Magick.tmpl"
X  
! MagickObjects= X.o image.o rotate.o quantize.o colors.o signature.o compress.o\
X    alien.o PreRvIcccm.o
X  
! SRCS= display.c X.c image.c rotate.c quantize.c colors.c signature.c\
X    compress.c alien.c PreRvIcccm.c
X  OBJS= display.o $(MagickObjects)
X  AnimateObjects= animate.o $(MagickObjects)
--- 25,34 ----
X  
X  #include "Magick.tmpl"
X  
! MagickObjects= X.o image.o shear.o quantize.o colors.o signature.o compress.o\
X    alien.o PreRvIcccm.o
X  
! SRCS= display.c X.c image.c shear.c quantize.c colors.c signature.c\
X    compress.c alien.c PreRvIcccm.c
X  OBJS= display.o $(MagickObjects)
X  AnimateObjects= animate.o $(MagickObjects)
diff -r -c ImageMagick/Make.com ImageMagick2.2.1/Make.com
*** ImageMagick/Make.com	Wed Jun 24 10:40:27 1992
--- ImageMagick2.2.1/Make.com	Fri Dec 18 17:08:13 1992
***************
*** 12,18 ****
X  $call Make display
X  $call Make X
X  $call Make image
! $call Make rotate
X  $call Make quantize
X  $call Make colors
X  $call Make signature
--- 12,18 ----
X  $call Make display
X  $call Make X
X  $call Make image
! $call Make shear
X  $call Make quantize
X  $call Make colors
X  $call Make signature
***************
*** 20,26 ****
X  $call Make alien
X  $call Make PreRvIcccm
X  $
! $link'link_options' display,X,image,rotate,quantize,colors,signature, -
X    compress,alien,PreRvIcccm,sys$input:/opt
X  sys$share:decw$xlibshr.exe/share
X  $
--- 20,26 ----
X  $call Make alien
X  $call Make PreRvIcccm
X  $
! $link'link_options' display,X,image,shear,quantize,colors,signature, -
X    compress,alien,PreRvIcccm,sys$input:/opt
X  sys$share:decw$xlibshr.exe/share
X  $
***************
*** 33,39 ****
X  $call Make import
X  $call Make X
X  $call Make image
! $call Make rotate
X  $call Make quantize
X  $call Make colors
X  $call Make signature
--- 33,39 ----
X  $call Make import
X  $call Make X
X  $call Make image
! $call Make shear
X  $call Make quantize
X  $call Make colors
X  $call Make signature
***************
*** 41,47 ****
X  $call Make alien
X  $call Make PreRvIcccm
X  $
! $link'link_options' import,X,image,rotate,quantize,colors,signature,compress, -
X    alien,PreRvIcccm,sys$input:/opt
X  sys$share:decw$xlibshr.exe/share
X  $
--- 41,47 ----
X  $call Make alien
X  $call Make PreRvIcccm
X  $
! $link'link_options' import,X,image,shear,quantize,colors,signature,compress, -
X    alien,PreRvIcccm,sys$input:/opt
X  sys$share:decw$xlibshr.exe/share
X  $
***************
*** 54,60 ****
X  $call Make XtoPS
X  $call Make X
X  $call Make image
! $call Make rotate
X  $call Make quantize
X  $call Make colors
X  $call Make signature
--- 54,60 ----
X  $call Make XtoPS
X  $call Make X
X  $call Make image
! $call Make shear
X  $call Make quantize
X  $call Make colors
X  $call Make signature
***************
*** 61,67 ****
X  $call Make compress
X  $call Make PreRvIcccm
X  $
! $link'link_options' XtoPS,X,image,rotate,quantize,colors,signature,compress, -
X    alien,PreRvIcccm,sys$input:/opt
X  sys$share:decw$xlibshr.exe/share
X  $
--- 61,67 ----
X  $call Make compress
X  $call Make PreRvIcccm
X  $
! $link'link_options' XtoPS,X,image,shear,quantize,colors,signature,compress, -
X    alien,PreRvIcccm,sys$input:/opt
X  sys$share:decw$xlibshr.exe/share
X  $
***************
*** 74,80 ****
X  $call Make animate
X  $call Make X
X  $call Make image
! $call Make rotate
X  $call Make quantize
X  $call Make colors
X  $call Make signature
--- 74,80 ----
X  $call Make animate
X  $call Make X
X  $call Make image
! $call Make shear
X  $call Make quantize
X  $call Make colors
X  $call Make signature
***************
*** 82,88 ****
X  $call Make alien
X  $call Make PreRvIcccm
X  $
! $link'link_options' animate,X,image,rotate,quantize,colors,signature, -
X    compress,alien,PreRvIcccm,sys$input:/opt
X  sys$share:decw$xlibshr.exe/share
X  $
--- 82,88 ----
X  $call Make alien
X  $call Make PreRvIcccm
X  $
! $link'link_options' animate,X,image,shear,quantize,colors,signature, -
X    compress,alien,PreRvIcccm,sys$input:/opt
X  sys$share:decw$xlibshr.exe/share
X  $
***************
*** 95,101 ****
X  $call Make montage
X  $call Make X
X  $call Make image
! $call Make rotate
X  $call Make quantize
X  $call Make colors
X  $call Make compress
--- 95,101 ----
X  $call Make montage
X  $call Make X
X  $call Make image
! $call Make shear
X  $call Make quantize
X  $call Make colors
X  $call Make compress
***************
*** 102,108 ****
X  $call Make alien
X  $call Make PreRvIcccm
X  $
! $link'link_options' montage,X,image,rotate,quantize,colors,signature, -
X    compress,alien,PreRvIcccm,sys$input:/opt
X  sys$share:decw$xlibshr.exe/share
X  $
--- 102,108 ----
X  $call Make alien
X  $call Make PreRvIcccm
X  $
! $link'link_options' montage,X,image,shear,quantize,colors,signature, -
X    compress,alien,PreRvIcccm,sys$input:/opt
X  sys$share:decw$xlibshr.exe/share
X  $
diff -r -c ImageMagick/Makefile ImageMagick2.2.1/Makefile
*** ImageMagick/Makefile	Thu Jun 11 21:45:51 1992
--- ImageMagick2.2.1/Makefile	Fri Dec 18 17:08:13 1992
***************
*** 45,51 ****
X  DEFINES= $(JPEG) $(JPEG_INCLUDES) $(TIFF) $(TIFF_INCLUDES)
X  SYS_LIBRARIES= $(XLIB) $(JPEG_LIBRARIES) $(TIFF_LIBRARIES) -lm
X  
! MagickObjects= X.o image.o rotate.o quantize.o colors.o signature.o compress.o\
X    alien.o PreRvIcccm.o
X  
X  DisplayObjects= display.o $(MagickObjects)
--- 45,51 ----
X  DEFINES= $(JPEG) $(JPEG_INCLUDES) $(TIFF) $(TIFF_INCLUDES)
X  SYS_LIBRARIES= $(XLIB) $(JPEG_LIBRARIES) $(TIFF_LIBRARIES) -lm
X  
! MagickObjects= X.o image.o shear.o quantize.o colors.o signature.o compress.o\
X    alien.o PreRvIcccm.o
X  
X  DisplayObjects= display.o $(MagickObjects)
diff -r -c ImageMagick/Manifest.ps ImageMagick2.2.1/Manifest.ps
*** ImageMagick/Manifest.ps	Wed Nov 25 14:23:10 1992
--- ImageMagick2.2.1/Manifest.ps	Fri Dec 18 17:09:13 1992
***************
*** 52,65 ****
X  90 362 m(montage.man)s
X  90 352 m(quantize.c)s
X  90 342 m(quantize.man)s
! 90 332 m(rotate.c)s
! 180 322 m(Makefile)s
! 180 312 m(README)s
! 180 302 m(dna.script)s
! 90 312 m(scenes)s
! (scenes) stringwidth pop 91.0 add 315.3 m
! [ 325.3 315.3 305.3]
X  {gsave 176.0 exch lineto stroke grestore} forall
X  90 292 m(signature.c)s
X  180 282 m(Imakefile)s
X  180 272 m(MIFFtoSTEREO.c)s
--- 52,65 ----
X  90 362 m(montage.man)s
X  90 352 m(quantize.c)s
X  90 342 m(quantize.man)s
! 180 332 m(Makefile)s
! 180 322 m(README)s
! 180 312 m(dna.script)s
! 90 322 m(scenes)s
! (scenes) stringwidth pop 91.0 add 325.3 m
! [ 335.3 325.3 315.3]
X  {gsave 176.0 exch lineto stroke grestore} forall
+ 90 302 m(shear.c)s
X  90 292 m(signature.c)s
X  180 282 m(Imakefile)s
X  180 272 m(MIFFtoSTEREO.c)s
***************
*** 89,94 ****
X  {gsave 176.0 exch lineto stroke grestore} forall
X  0 444 m(ImageMagick)s
X  (ImageMagick) stringwidth pop 1.0 add 447.8 m
! [ 735.3 725.3 715.3 705.3 695.3 685.3 675.3 665.3 655.3 645.3 635.3 625.3 615.3 605.3 595.3 585.3 575.3 565.3 555.3 545.3 535.3 525.3 515.3 505.3 495.3 485.3 475.3 465.3 435.3 405.3 395.3 385.3 375.3 365.3 355.3 345.3 335.3 315.3 295.3 250.3 160.3]
X  {gsave 86.0 exch lineto stroke grestore} forall
X  showpage
--- 89,94 ----
X  {gsave 176.0 exch lineto stroke grestore} forall
X  0 444 m(ImageMagick)s
X  (ImageMagick) stringwidth pop 1.0 add 447.8 m
! [ 735.3 725.3 715.3 705.3 695.3 685.3 675.3 665.3 655.3 645.3 635.3 625.3 615.3 605.3 595.3 585.3 575.3 565.3 555.3 545.3 535.3 525.3 515.3 505.3 495.3 485.3 475.3 465.3 435.3 405.3 395.3 385.3 375.3 365.3 355.3 345.3 325.3 305.3 295.3 250.3 160.3]
X  {gsave 86.0 exch lineto stroke grestore} forall
X  showpage
diff -r -c ImageMagick/README ImageMagick2.2.1/README
*** ImageMagick/README	Thu Dec 10 15:16:54 1992
--- ImageMagick2.2.1/README	Fri Dec 18 17:10:28 1992
***************
*** 234,239 ****
--- 234,244 ----
X  
X          Illegal unit size: 8 found in routine: _normalizeimagebits
X  
+       If alien.c does not compile on your HP, type defining
+       -DXLIB_ILLEGAL_ACCESS when compiling.  If `display' dumps core
+       when exiting, remove XCloseDisplay near the last line of
+       display.c.
+ 
X    4.  On occasion, a window manager (twm) may get in strange state which will 
X        cause the display program to work improperly.  Fix this by restarting the
X        window manager.
diff -r -c ImageMagick/X.c ImageMagick2.2.1/X.c
*** ImageMagick/X.c	Mon Dec  7 17:23:19 1992
--- ImageMagick2.2.1/X.c	Mon Dec 21 14:12:34 1992
***************
*** 62,68 ****
X    External declarations.
X  */
X  extern char
!   *application_name;
X  
X  extern void
X    Error _Declare((char *,char *));
--- 62,68 ----
X    External declarations.
X  */
X  extern char
!   *client_name;
X  
X  extern void
X    Error _Declare((char *,char *));
***************
*** 136,144 ****
X  %  greater than, equal to, or less than second.  The two strings are
X  %  assumed to be encoded using ISO 8859-1.
X  %
! %  The format of the Latin1Upper routine is:
X  %
! %      Latin1Upper(first,second)
X  %
X  %  A description of each parameter follows:
X  %
--- 136,144 ----
X  %  greater than, equal to, or less than second.  The two strings are
X  %  assumed to be encoded using ISO 8859-1.
X  %
! %  The format of the Latin1Compare routine is:
X  %
! %      Latin1Compare(first,second)
X  %
X  %  A description of each parameter follows:
X  %
***************
*** 386,392 ****
X    /*
X      Get user defaults from X resource database.
X    */
!   XGetResourceInfo(resource_database,application_name,&resource_info);
X    /*
X      Initialize visual info.
X    */
--- 386,392 ----
X    /*
X      Get user defaults from X resource database.
X    */
!   XGetResourceInfo(resource_database,client_name,&resource_info);
X    /*
X      Initialize visual info.
X    */
***************
*** 1117,1123 ****
X    /*
X      Get user defaults from X resource database.
X    */
!   XGetResourceInfo(resource_database,application_name,&resource_info);
X    /*
X      Initialize visual info.
X    */
--- 1117,1123 ----
X    /*
X      Get user defaults from X resource database.
X    */
!   XGetResourceInfo(resource_database,client_name,&resource_info);
X    /*
X      Initialize visual info.
X    */
***************
*** 1129,1135 ****
X        return((Image *) NULL);
X      }
X    /*
!     Determine background foreground colors.
X    */
X    map_info.colormap=XDefaultColormap(display,visual_info->screen);
X    XGetPixelInfo(display,visual_info,&map_info,&resource_info,(Image *) NULL,
--- 1129,1135 ----
X        return((Image *) NULL);
X      }
X    /*
!     Determine border color.
X    */
X    map_info.colormap=XDefaultColormap(display,visual_info->screen);
X    XGetPixelInfo(display,visual_info,&map_info,&resource_info,(Image *) NULL,
***************
*** 1167,1175 ****
X        DestroyImage(image);
X        return((Image *) NULL);
X      }
!   image->colormap[0].red=pixel_info.background_color.red >> 8;
!   image->colormap[0].green=pixel_info.background_color.red >> 8;
!   image->colormap[0].blue=pixel_info.background_color.red >> 8;
X    p=image->pixels;
X    for (i=0; i < (image->columns*image->rows); i++)
X    {
--- 1167,1175 ----
X        DestroyImage(image);
X        return((Image *) NULL);
X      }
!   image->colormap[0].red=pixel_info.border_color.red >> 8;
!   image->colormap[0].green=pixel_info.border_color.green >> 8;
!   image->colormap[0].blue=pixel_info.border_color.blue >> 8;
X    p=image->pixels;
X    for (i=0; i < (image->columns*image->rows); i++)
X    {
***************
*** 1372,1379 ****
X    */
X    (void) XParseGeometry(annotate_info->geometry,&x,&y,&width,&height);
X    if ((width != annotate_image->columns) || (height != annotate_image->rows))
!     TransformImage(&annotate_image,(char *) NULL,
!       annotate_info->geometry,(char *) NULL);
X    if (annotate_info->degrees != 0.0)
X      {
X        Image
--- 1372,1379 ----
X    */
X    (void) XParseGeometry(annotate_info->geometry,&x,&y,&width,&height);
X    if ((width != annotate_image->columns) || (height != annotate_image->rows))
!     TransformImage(&annotate_image,(char *) NULL,annotate_info->geometry,
!       (char *) NULL);
X    if (annotate_info->degrees != 0.0)
X      {
X        Image
***************
*** 1576,1586 ****
X  #define MaxIconSize  64
X  
X    int
X      number_sizes;
X  
X    unsigned int
X      icon_height,
!     icon_width;
X  
X    unsigned long int
X      scale_factor;
--- 1576,1589 ----
X  #define MaxIconSize  64
X  
X    int
+     i,
X      number_sizes;
X  
X    unsigned int
+     height,
X      icon_height,
!     icon_width,
!     width;
X  
X    unsigned long int
X      scale_factor;
***************
*** 1622,1636 ****
X        icon_size->height_inc=1;
X      }
X    /*
X      Look for an icon size that maintains the aspect ratio of image.
X    */
!   scale_factor=UpShift(icon_size->max_width)/image->columns;
!   if (scale_factor > (UpShift(icon_size->max_height)/image->rows))
!     scale_factor=UpShift(icon_size->max_height)/image->rows;
X    icon_width=icon_size->min_width;
X    while (icon_width < icon_size->max_width)
X    {
!     if (icon_width >= (DownShift(image->columns*scale_factor)))
X        break;
X      icon_width+=icon_size->width_inc;
X    }
--- 1625,1646 ----
X        icon_size->height_inc=1;
X      }
X    /*
+     Determine aspect ratio of image.
+   */
+   width=image->columns;
+   height=image->rows;
+   if (window->clip_geometry)
+     (void) XParseGeometry(window->clip_geometry,&i,&i,&width,&height);
+   /*
X      Look for an icon size that maintains the aspect ratio of image.
X    */
!   scale_factor=UpShift(icon_size->max_width)/width;
!   if (scale_factor > (UpShift(icon_size->max_height)/height))
!     scale_factor=UpShift(icon_size->max_height)/height;
X    icon_width=icon_size->min_width;
X    while (icon_width < icon_size->max_width)
X    {
!     if (icon_width >= (DownShift(width*scale_factor)))
X        break;
X      icon_width+=icon_size->width_inc;
X    }
***************
*** 1637,1643 ****
X    icon_height=icon_size->min_height;
X    while (icon_height < icon_size->max_height)
X    {
!     if (icon_height >= (DownShift(image->rows*scale_factor)))
X        break;
X      icon_height+=icon_size->height_inc;
X    }
--- 1647,1653 ----
X    icon_height=icon_size->min_height;
X    while (icon_height < icon_size->max_height)
X    {
!     if (icon_height >= (DownShift(height*scale_factor)))
X        break;
X      icon_height+=icon_size->height_inc;
X    }
***************
*** 2352,2358 ****
X  %
X  %  The format of the XGetResource routine is:
X  %
! %      value=XGetResource(database,application_name,name,class,resource_default)
X  %
X  %  A description of each parameter follows:
X  %
--- 2362,2368 ----
X  %
X  %  The format of the XGetResource routine is:
X  %
! %      value=XGetResource(database,client,keyword,resource_default)
X  %
X  %  A description of each parameter follows:
X  %
***************
*** 2363,2388 ****
X  %    o database: Specifies a resource database; returned from
X  %      XrmGetStringDatabase.
X  %
! %    o application_name:  Specifies the application name used to retrieve
X  %      resource info from the X server database.
X  %
! %    o name: Specifies the name of the value being retrieved.
X  %
- %    o class: Specifies the class of the value being retrieved.
- %
X  %    o resource_default: Specifies the default value to return if the query
! %      fails to find the specified name/class.
X  %
X  %
X  */
! char *XGetResource(database,application_name,name,class,resource_default)
X  XrmDatabase
X    database;
X  
X  char
!   *application_name,
!   *name,
!   *class,
X    *resource_default;
X  {
X    char
--- 2373,2395 ----
X  %    o database: Specifies a resource database; returned from
X  %      XrmGetStringDatabase.
X  %
! %    o client:  Specifies the application name used to retrieve
X  %      resource info from the X server database.
X  %
! %    o keyword: Specifies the keyword of the value being retrieved.
X  %
X  %    o resource_default: Specifies the default value to return if the query
! %      fails to find the specified keyword/class.
X  %
X  %
X  */
! char *XGetResource(database,client,keyword,resource_default)
X  XrmDatabase
X    database;
X  
X  char
!   *client,
!   *keyword,
X    *resource_default;
X  {
X    char
***************
*** 2399,2409 ****
X    if (database == (XrmDatabase) NULL)
X      return(resource_default);
X    *resource_name='\0';
-   if (name != (char *) NULL)
-     (void) sprintf(resource_name,"%s.%s\0",application_name,name);
X    *resource_class='\0';
!   if (class != (char *) NULL)
!     (void) sprintf(resource_class,"%s.%s\0",application_name,class);
X    status=XrmGetResource(database,resource_name,resource_class,&resource_type,
X      &resource_value);
X    if (status == False)
--- 2406,2442 ----
X    if (database == (XrmDatabase) NULL)
X      return(resource_default);
X    *resource_name='\0';
X    *resource_class='\0';
!   if (keyword != (char *) NULL)
!     {
!       unsigned char
!         c,
!         k;
!      
!       /*
!         Initialize resource keyword and class.
!       */
!       (void) sprintf(resource_name,"%s.%s\0",client,keyword);
!       c=(*client);
!       if ((c >= XK_a) && (c <= XK_z))
!         c-=(XK_a-XK_A);
!       else
!         if ((c >= XK_agrave) && (c <= XK_odiaeresis))
!           c-=(XK_agrave-XK_Agrave);
!         else
!           if ((c >= XK_oslash) && (c <= XK_thorn))
!             c-=(XK_oslash-XK_Ooblique);
!       k=(*keyword);
!       if ((k >= XK_a) && (k <= XK_z))
!         k-=(XK_a-XK_A);
!       else
!         if ((k >= XK_agrave) && (k <= XK_odiaeresis))
!           k-=(XK_agrave-XK_Agrave);
!         else
!           if ((k >= XK_oslash) && (k <= XK_thorn))
!             k-=(XK_oslash-XK_Ooblique);
!       (void) sprintf(resource_class,"%c%s.%c%s\0",c,client+1,k,keyword+1);
!     }
X    status=XrmGetResource(database,resource_name,resource_class,&resource_type,
X      &resource_value);
X    if (status == False)
***************
*** 2426,2432 ****
X  %
X  %  The format of the XGetResourceInfo routine is:
X  %
! %      XGetResourceInfo(resource_database,application_name,resource_info)
X  %
X  %  A description of each parameter follows:
X  %
--- 2459,2465 ----
X  %
X  %  The format of the XGetResourceInfo routine is:
X  %
! %      XGetResourceInfo(resource_database,client_name,resource_info)
X  %
X  %  A description of each parameter follows:
X  %
***************
*** 2433,2439 ****
X  %    o resource_database: Specifies a resource database; returned from
X  %      XrmGetStringDatabase.
X  %
! %    o application_name:  Specifies the application name used to retrieve
X  %      resource info from the X server database.
X  %
X  %    o resource_info: Specifies a pointer to a X11 XResourceInfo structure.
--- 2466,2472 ----
X  %    o resource_database: Specifies a resource database; returned from
X  %      XrmGetStringDatabase.
X  %
! %    o client_name:  Specifies the application name used to retrieve
X  %      resource info from the X server database.
X  %
X  %    o resource_info: Specifies a pointer to a X11 XResourceInfo structure.
***************
*** 2440,2451 ****
X  %
X  %
X  */
! void XGetResourceInfo(resource_database,application_name,resource_info)
X  XrmDatabase
X    resource_database;
X  
X  char
!   *application_name;
X  
X  XResourceInfo
X    *resource_info;
--- 2473,2484 ----
X  %
X  %
X  */
! void XGetResourceInfo(resource_database,client_name,resource_info)
X  XrmDatabase
X    resource_database;
X  
X  char
!   *client_name;
X  
X  XResourceInfo
X    *resource_info;
***************
*** 2456,2473 ****
X    /*
X      Initialize resource info fields.
X    */
!   resource_value=XGetResource(resource_database,application_name,"backdrop",
!     (char *) NULL,"False");
X    resource_info->backdrop=IsTrue(resource_value);
!   resource_info->background_color=XGetResource(resource_database,
!     application_name,"background","Background","black");
!   resource_info->border_color=XGetResource(resource_database,application_name,
!     "borderColor","BorderColor","white");
!   resource_value=XGetResource(resource_database,application_name,"borderWidth",
!     "BorderWidth","2");
X    resource_info->border_width=atoi(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"colormap",
!     (char *) NULL,"shared");
X    resource_info->colormap=UndefinedColormap;
X    if (Latin1Compare("private",resource_value) == 0)
X      resource_info->colormap=PrivateColormap;
--- 2489,2504 ----
X    /*
X      Initialize resource info fields.
X    */
!   resource_value=XGetResource(resource_database,client_name,"backdrop","False");
X    resource_info->backdrop=IsTrue(resource_value);
!   resource_info->background_color=
!     XGetResource(resource_database,client_name,"background","black");
!   resource_info->border_color=
!     XGetResource(resource_database,client_name,"borderColor","white");
!   resource_value=XGetResource(resource_database,client_name,"borderWidth","2");
X    resource_info->border_width=atoi(resource_value);
!   resource_value=
!     XGetResource(resource_database,client_name,"colormap","shared");
X    resource_info->colormap=UndefinedColormap;
X    if (Latin1Compare("private",resource_value) == 0)
X      resource_info->colormap=PrivateColormap;
***************
*** 2475,2485 ****
X      resource_info->colormap=SharedColormap;
X    if (resource_info->colormap == UndefinedColormap)
X      Warning("unrecognized colormap type",resource_value);
!   resource_value=XGetResource(resource_database,application_name,"colors",
!     (char *) NULL,"0");
X    resource_info->number_colors=atoi(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"colorspace",
!     (char *) NULL,"rgb");
X    resource_info->colorspace=UndefinedColorspace;
X    if (Latin1Compare("gray",resource_value) == 0)
X      resource_info->colorspace=GRAYColorspace;
--- 2506,2514 ----
X      resource_info->colormap=SharedColormap;
X    if (resource_info->colormap == UndefinedColormap)
X      Warning("unrecognized colormap type",resource_value);
!   resource_value=XGetResource(resource_database,client_name,"colors","0");
X    resource_info->number_colors=atoi(resource_value);
!   resource_value=XGetResource(resource_database,client_name,"colorspace","rgb");
X    resource_info->colorspace=UndefinedColorspace;
X    if (Latin1Compare("gray",resource_value) == 0)
X      resource_info->colorspace=GRAYColorspace;
***************
*** 2493,2533 ****
X      resource_info->colorspace=XYZColorspace;
X    if (resource_info->colorspace == UndefinedColorspace)
X      Warning("unrecognized colorspace type",resource_value);
!   resource_value=XGetResource(resource_database,application_name,"debug",
!     (char *) NULL,"False");
X    resource_info->debug=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"delay",
!     (char *) NULL,"0");
X    resource_info->delay=atoi(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"dither",
!     (char *) NULL,"False");
X    resource_info->dither=IsTrue(resource_value);
!   resource_info->font=XGetResource(resource_database,application_name,
!     "font","Font",(char *) NULL);
!   resource_info->font_name[0]=XGetResource(resource_database,application_name,
!     "font1","Font1","fixed");
!   resource_info->font_name[1]=XGetResource(resource_database,application_name,
!     "font2","Font2","variable");
!   resource_info->font_name[2]=XGetResource(resource_database,application_name,
!     "font3","Font3","5x8");
!   resource_info->font_name[3]=XGetResource(resource_database,application_name,
!     "font4","Font4","6x10");
!   resource_info->font_name[4]=XGetResource(resource_database,application_name,
!     "font5","Font5","7x13bold");
!   resource_info->font_name[5]=XGetResource(resource_database,application_name,
!     "font6","Font6","8x13bold");
!   resource_info->font_name[6]=XGetResource(resource_database,application_name,
!     "font7","Font7","9x15bold");
!   resource_info->font_name[7]=XGetResource(resource_database,application_name,
!     "font8","Font8","10x20");
!   resource_info->font_name[8]=XGetResource(resource_database,application_name,
!     "font9","Font9","12x24");
!   resource_info->foreground_color=XGetResource(resource_database,
!     application_name,"foreground","Foreground","white");
!   resource_info->icon_geometry=XGetResource(resource_database,
!     application_name,"iconGeometry","IconGeometry",(char *) NULL);
!   resource_value=XGetResource(resource_database,application_name,"gravity",
!     (char *) NULL,"Center");
X    resource_info->gravity=(-1);
X    if (Latin1Compare("Forget",resource_value) == 0)
X      resource_info->gravity=ForgetGravity;
--- 2522,2558 ----
X      resource_info->colorspace=XYZColorspace;
X    if (resource_info->colorspace == UndefinedColorspace)
X      Warning("unrecognized colorspace type",resource_value);
!   resource_value=XGetResource(resource_database,client_name,"debug","False");
X    resource_info->debug=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,client_name,"delay","0");
X    resource_info->delay=atoi(resource_value);
!   resource_value=XGetResource(resource_database,client_name,"dither","False");
X    resource_info->dither=IsTrue(resource_value);
!   resource_info->font=
!     XGetResource(resource_database,client_name,"font",(char *) NULL);
!   resource_info->font_name[0]=
!     XGetResource(resource_database,client_name,"font1","fixed");
!   resource_info->font_name[1]=
!     XGetResource(resource_database,client_name,"font2","variable");
!   resource_info->font_name[2]=
!     XGetResource(resource_database,client_name,"font3","5x8");
!   resource_info->font_name[3]=
!     XGetResource(resource_database,client_name,"font4","6x10");
!   resource_info->font_name[4]=
!     XGetResource(resource_database,client_name,"font5","7x13bold");
!   resource_info->font_name[5]=
!     XGetResource(resource_database,client_name,"font6","8x13bold");
!   resource_info->font_name[6]=
!     XGetResource(resource_database,client_name,"font7","9x15bold");
!   resource_info->font_name[7]=
!     XGetResource(resource_database,client_name,"font8","10x20");
!   resource_info->font_name[8]=
!     XGetResource(resource_database,client_name,"font9","12x24");
!   resource_info->foreground_color=
!     XGetResource(resource_database,client_name,"foreground","white");
!   resource_info->icon_geometry=
!     XGetResource(resource_database,client_name,"iconGeometry",(char *) NULL);
!   resource_value=XGetResource(resource_database,client_name,"gravity","Center");
X    resource_info->gravity=(-1);
X    if (Latin1Compare("Forget",resource_value) == 0)
X      resource_info->gravity=ForgetGravity;
***************
*** 2552,2602 ****
X    if (Latin1Compare("Static",resource_value) == 0)
X      resource_info->gravity=StaticGravity;
X    if (resource_info->gravity == (-1))
!     Warning("unrecognized gravity type",resource_value);
!   resource_value=XGetResource(resource_database,application_name,"iconic",
!     "Iconic","False");
X    resource_info->iconic=IsTrue(resource_value);
!   resource_info->image_geometry=XGetResource(resource_database,
!     application_name,"imageGeometry","ImageGeometry",(char *) NULL);
!   resource_value=XGetResource(resource_database,application_name,"magnify",
!     (char *) NULL,"2");
X    resource_info->magnify=atoi(resource_value);
!   resource_info->map_type=XGetResource(resource_database,application_name,"map",
!     "Map",(char *) NULL);
!   resource_value=XGetResource(resource_database,application_name,"monochrome",
!     (char *) NULL,"False");
X    resource_info->monochrome=IsTrue(resource_value);
!   resource_info->name=XGetResource(resource_database,application_name,"name",
!     "Name",(char *) NULL);
!   resource_info->pen_color[0]=XGetResource(resource_database,application_name,
!     "pen1","Pen1","black");
!   resource_info->pen_color[1]=XGetResource(resource_database,application_name,
!     "pen2","Pen2","blue");
!   resource_info->pen_color[2]=XGetResource(resource_database,application_name,
!     "pen3","Pen3","cyan");
!   resource_info->pen_color[3]=XGetResource(resource_database,application_name,
!     "pen4","Pen4","green");
!   resource_info->pen_color[4]=XGetResource(resource_database,application_name,
!     "pen5","Pen5","gray");
!   resource_info->pen_color[5]=XGetResource(resource_database,application_name,
!     "pen6","Pen6","red");
!   resource_info->pen_color[6]=XGetResource(resource_database,application_name,
!     "pen7","Pen7","magenta");
!   resource_info->pen_color[7]=XGetResource(resource_database,application_name,
!     "pen8","Pen8","yellow");
!   resource_info->pen_color[8]=XGetResource(resource_database,application_name,
!     "pen9","Pen9","white");
!   resource_info->print_filename=XGetResource(resource_database,application_name,
!     "printFilename",(char *) NULL,(char *) NULL);
!   resource_info->title=XGetResource(resource_database,application_name,"title",
!     "Title",(char *) NULL);
!   resource_value=XGetResource(resource_database,application_name,"treeDepth",
!     (char *) NULL,"0");
X    resource_info->tree_depth=atoi(resource_value);
!   resource_info->write_filename=XGetResource(resource_database,application_name,
!     "writeFilename",(char *) NULL,(char *) NULL);
!   resource_info->visual_type=XGetResource(resource_database,application_name,
!     "visual","Visual",(char *) NULL);
X  }
X  
X  /*
--- 2577,2627 ----
X    if (Latin1Compare("Static",resource_value) == 0)
X      resource_info->gravity=StaticGravity;
X    if (resource_info->gravity == (-1))
!     {
!       Warning("unrecognized gravity type",resource_value);
!       resource_info->gravity=CenterGravity;
!     }
!   resource_value=XGetResource(resource_database,client_name,"iconic","False");
X    resource_info->iconic=IsTrue(resource_value);
!   resource_info->image_geometry=
!     XGetResource(resource_database,client_name,"imageGeometry",(char *) NULL);
!   resource_value=XGetResource(resource_database,client_name,"magnify","2");
X    resource_info->magnify=atoi(resource_value);
!   resource_info->map_type=
!     XGetResource(resource_database,client_name,"map",(char *) NULL);
!   resource_value=
!     XGetResource(resource_database,client_name,"monochrome","False");
X    resource_info->monochrome=IsTrue(resource_value);
!   resource_info->name=
!     XGetResource(resource_database,client_name,"name",(char *) NULL);
!   resource_info->pen_color[0]=
!     XGetResource(resource_database,client_name,"pen1","black");
!   resource_info->pen_color[1]=
!     XGetResource(resource_database,client_name,"pen2","blue");
!   resource_info->pen_color[2]=
!     XGetResource(resource_database,client_name,"pen3","cyan");
!   resource_info->pen_color[3]=
!     XGetResource(resource_database,client_name,"pen4","green");
!   resource_info->pen_color[4]=
!     XGetResource(resource_database,client_name,"pen5","gray");
!   resource_info->pen_color[5]=
!     XGetResource(resource_database,client_name,"pen6","red");
!   resource_info->pen_color[6]=
!     XGetResource(resource_database,client_name,"pen7","magenta");
!   resource_info->pen_color[7]=
!     XGetResource(resource_database,client_name,"pen8","yellow");
!   resource_info->pen_color[8]=
!     XGetResource(resource_database,client_name,"pen9","white");
!   resource_info->print_filename=
!     XGetResource(resource_database,client_name,"printFilename",(char *) NULL);
!   resource_info->title=
!     XGetResource(resource_database,client_name,"title",(char *) NULL);
!   resource_value=XGetResource(resource_database,client_name,"treeDepth","0");
X    resource_info->tree_depth=atoi(resource_value);
!   resource_info->write_filename=
!     XGetResource(resource_database,client_name,"writeFilename",(char *) NULL);
!   resource_info->visual_type=
!     XGetResource(resource_database,client_name,"visual",(char *) NULL);
X  }
X  
X  /*
***************
*** 2748,2754 ****
X              clip_x,
X              clip_y;
X  
!           unsigned
X              clip_height,
X              clip_width;
X  
--- 2773,2779 ----
X              clip_x,
X              clip_y;
X  
!           unsigned int
X              clip_height,
X              clip_width;
X  
diff -r -c ImageMagick/X.h ImageMagick2.2.1/X.h
*** ImageMagick/X.h	Mon Dec  7 09:23:03 1992
--- ImageMagick2.2.1/X.h	Fri Dec 18 17:07:28 1992
***************
*** 243,249 ****
X    X utilities routines.
X  */
X  extern char 
!   *XGetResource _Declare((XrmDatabase,char *,char *,char *,char *)),
X    *XVisualClassName _Declare((XVisualInfo *));
X  
X  extern Cursor 
--- 243,249 ----
X    X utilities routines.
X  */
X  extern char 
!   *XGetResource _Declare((XrmDatabase,char *,char *,char *)),
X    *XVisualClassName _Declare((XVisualInfo *));
X  
X  extern Cursor 
diff -r -c ImageMagick/XtoPS.c ImageMagick2.2.1/XtoPS.c
*** ImageMagick/XtoPS.c	Mon Dec  7 09:12:50 1992
--- ImageMagick2.2.1/XtoPS.c	Fri Dec 18 17:07:26 1992
***************
*** 87,93 ****
X    Global declarations.
X  */
X  char
!   *application_name;
X  
X  /*
X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- 87,93 ----
X    Global declarations.
X  */
X  char
!   *client_name;
X  
X  /*
X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
***************
*** 120,126 ****
X    *message,
X    *qualifier;
X  {
!   (void) fprintf(stderr,"%s: %s",application_name,message);
X    if (qualifier != (char *) NULL)
X      (void) fprintf(stderr," (%s)",qualifier);
X    (void) fprintf(stderr,".\n");
--- 120,126 ----
X    *message,
X    *qualifier;
X  {
!   (void) fprintf(stderr,"%s: %s",client_name,message);
X    if (qualifier != (char *) NULL)
X      (void) fprintf(stderr," (%s)",qualifier);
X    (void) fprintf(stderr,".\n");
***************
*** 167,173 ****
X        "-window id          select window with this id or name",
X        (char *) NULL
X      };
!   (void) fprintf(stderr,"Usage: %s [options ...] file\n",application_name);
X    (void) fprintf(stderr,"\nWhere options include:\n");
X    for (p=options; *p != (char *) NULL; p++)
X      (void) fprintf(stderr,"  %s\n",*p);
--- 167,173 ----
X        "-window id          select window with this id or name",
X        (char *) NULL
X      };
!   (void) fprintf(stderr,"Usage: %s [options ...] file\n",client_name);
X    (void) fprintf(stderr,"\nWhere options include:\n");
X    for (p=options; *p != (char *) NULL; p++)
X      (void) fprintf(stderr,"  %s\n",*p);
***************
*** 201,207 ****
X  {
X    char
X      *filename,
-     *image_geometry,
X      *option,
X      *resource_value,
X      *scale_geometry,
--- 201,206 ----
***************
*** 238,244 ****
X    /*
X      Display usage profile if there are no command line arguments.
X    */
!   application_name=(*argv);
X    if (argc < 2)
X      Usage();
X    /*
--- 237,243 ----
X    /*
X      Display usage profile if there are no command line arguments.
X    */
!   client_name=(*argv);
X    if (argc < 2)
X      Usage();
X    /*
***************
*** 284,308 ****
X    /*
X      Get user defaults from X resource database.
X    */
!   XGetResourceInfo(resource_database,application_name,&resource_info);
!   resource_value=XGetResource(resource_database,application_name,"borders",
!     (char *) NULL,"False");
X    borders=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"frame",
!     (char *) NULL,"False");
X    frame=IsTrue(resource_value);
!   image_geometry=XGetResource(resource_database,application_name,
!     "imageGeometry","ImageGeometry",(char *) NULL);
!   resource_value=XGetResource(resource_database,application_name,"rotate",
!     (char *) NULL,"False");
!   scale_geometry=XGetResource(resource_database,application_name,
!     "scaleGeometry","ScaleGeometry",(char *) NULL);
X    degrees=atoi(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"screen",
!     (char *) NULL,"False");
X    screen=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"verbose",
!     (char *) NULL,"False");
X    verbose=IsTrue(resource_value);
X    /*
X      Check command syntax.
--- 283,300 ----
X    /*
X      Get user defaults from X resource database.
X    */
!   XGetResourceInfo(resource_database,client_name,&resource_info);
!   resource_value=XGetResource(resource_database,client_name,"borders","False");
X    borders=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,client_name,"frame","False");
X    frame=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,client_name,"rotate","False");
!   scale_geometry=
!     XGetResource(resource_database,client_name,"scaleGeometry",(char *) NULL);
X    degrees=atoi(resource_value);
!   resource_value=XGetResource(resource_database,client_name,"screen","False");
X    screen=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,client_name,"verbose","False");
X    verbose=IsTrue(resource_value);
X    /*
X      Check command syntax.
***************
*** 359,365 ****
X            i++;
X            if (i == argc)
X              Error("missing geometry on -geometry",(char *) NULL);
!           image_geometry=argv[i];
X            break;
X          }
X          case 'h':
--- 351,357 ----
X            i++;
X            if (i == argc)
X              Error("missing geometry on -geometry",(char *) NULL);
!           resource_info.image_geometry=argv[i];
X            break;
X          }
X          case 'h':
***************
*** 442,449 ****
X    image=ReadXImage(target_window,server_name,frame,screen,borders);
X    if (image == (Image *) NULL)
X      exit(1);
!   if (image_geometry || scale_geometry)
!     TransformImage(&image,(char *) NULL,image_geometry,scale_geometry);
X    if ((degrees % 360) != 0)
X      {
X        Image
--- 434,442 ----
X    image=ReadXImage(target_window,server_name,frame,screen,borders);
X    if (image == (Image *) NULL)
X      exit(1);
!   if (resource_info.image_geometry || scale_geometry)
!     TransformImage(&image,(char *) NULL,resource_info.image_geometry,
!       scale_geometry);
X    if ((degrees % 360) != 0)
X      {
X        Image
***************
*** 462,468 ****
X    if (resource_info.monochrome)
X      QuantizeImage(image,2,8,False,GRAYColorspace,True);
X    (void) strcpy(image->filename,filename);
!   (void) PrintImage(image,image_geometry);
X    if (verbose)
X      {
X        /*
--- 455,461 ----
X    if (resource_info.monochrome)
X      QuantizeImage(image,2,8,False,GRAYColorspace,True);
X    (void) strcpy(image->filename,filename);
!   (void) PrintImage(image,resource_info.image_geometry);
X    if (verbose)
X      {
X        /*
***************
*** 469,475 ****
X          Display detailed info about the image.
X        */
X        if (image->class == DirectClass)
!         image->colors=NumberColors(image);
X        (void) fprintf(stderr,"[%u] %s %ux%u",image->scene,image->filename,
X          image->columns,image->rows);
X        if (image->class == DirectClass)
--- 462,468 ----
X          Display detailed info about the image.
X        */
X        if (image->class == DirectClass)
!         image->colors=NumberColors(image,(FILE *) NULL);
X        (void) fprintf(stderr,"[%u] %s %ux%u",image->scene,image->filename,
X          image->columns,image->rows);
X        if (image->class == DirectClass)
diff -r -c ImageMagick/XtoPS.man ImageMagick2.2.1/XtoPS.man
*** ImageMagick/XtoPS.man	Mon Dec  7 19:52:59 1992
--- ImageMagick2.2.1/XtoPS.man	Fri Dec 18 17:07:31 1992
***************
*** 79,84 ****
--- 79,87 ----
X  .B "-rotate \fIdegrees\fP"
X  apply Paeth image rotation to the image.
X  
+ Empty triangles left over from rotating the image are filled with
+ the color defined by the pixel at location (0,0).
+ 
X  By default the image is output in portrait mode.  Use \fB-rotate 90\fP to
X  display the image in landscape mode.
X  .TP 5
***************
*** 91,98 ****
X  one factor is specified, both the width and height factors assume the
X  value.
X  
! Factors may be fractional.  For example, a factor of 1.5 will increase the
! image size by one and one-half.
X  .TP 5
X  .B "-screen"
X  This option indicates that the GetImage request used to obtain the image
--- 94,102 ----
X  one factor is specified, both the width and height factors assume the
X  value.
X  
! Factors may be fractional.  To increase the size of an image, use a
! scale factor greater than 1.0.  To decrease an image's size, use a
! scale factor less than 1.0.  Default is 1.0.
X  .TP 5
X  .B "-screen"
X  This option indicates that the GetImage request used to obtain the image
diff -r -c ImageMagick/alien.c ImageMagick2.2.1/alien.c
*** ImageMagick/alien.c	Tue Dec  8 11:16:04 1992
--- ImageMagick2.2.1/alien.c	Sat Dec 19 02:57:52 1992
***************
*** 68,73 ****
--- 68,74 ----
X      "FAX",
X      "GIF",
X      "GRAY",
+     "HISTOGRAM",
X      "JPEG",
X      "JPG",
X      "MIFF",
***************
*** 92,99 ****
X    External declarations.
X  */
X  extern char
!   *application_name;
! 
X  /*
X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X  %                                                                             %
--- 93,99 ----
X    External declarations.
X  */
X  extern char
!   *client_name;
X  /*
X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X  %                                                                             %
***************
*** 614,620 ****
X        (void) free((char *) colormap);
X      }
X    image_count=0;
!   while (1)
X    {
X      status=ReadData((char *) &c,1,1,image->file);
X      if (status == False)
--- 614,620 ----
X        (void) free((char *) colormap);
X      }
X    image_count=0;
!   for ( ; ; )
X    {
X      status=ReadData((char *) &c,1,1,image->file);
X      if (status == False)
***************
*** 4732,4737 ****
--- 4732,4784 ----
X    return(True);
X  }
X  
+ /*
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %                                                                             %
+ %                                                                             %
+ %                                                                             %
+ %   W r i t e H I S T O G R A M I m a g e                                     %
+ %                                                                             %
+ %                                                                             %
+ %                                                                             %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ %  Function WriteHISTOGRAMImage writes an image to a file in HISTOGRAM format.
+ %  A list of unique pixel values and the number of times each occurs in the
+ %  image is written to the file.
+ %
+ %  The format of the WriteHISTOGRAMImage routine is:
+ %
+ %      status=WriteAVSImage(image)
+ %
+ %  A description of each parameter follows.
+ %
+ %    o status: Function WriteImage return True if the image is written.
+ %      False is returned is there is a memory shortage or if the image file
+ %      fails to write.
+ %
+ %    o image:  A pointer to a Image structure.
+ %
+ %
+ */
+ static unsigned int WriteHISTOGRAMImage(image)
+ Image
+   *image;
+ {
+   /*
+     Open output image file.
+   */
+   OpenImage(image,"w");
+   if (image->file == (FILE *) NULL)
+     {
+       Warning("unable to open file",image->filename);
+       return(False);
+     }
+   (void) NumberColors(image,image->file);
+   CloseImage(image);
+   return(True);
+ }
+ 
X  #ifdef AlienJPEG
X  /*
X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
***************
*** 5117,5126 ****
X        */
X        format='5';
X        if (image->colors == 2)
!         {
!           format='4';
!           packets/=8;
!         }
X        for (i=0; i < image->colors; i++)
X          if ((image->colormap[i].red != image->colormap[i].green) ||
X              (image->colormap[i].green != image->colormap[i].blue))
--- 5164,5170 ----
X        */
X        format='5';
X        if (image->colors == 2)
!         format='4';
X        for (i=0; i < image->colors; i++)
X          if ((image->colormap[i].red != image->colormap[i].green) ||
X              (image->colormap[i].green != image->colormap[i].blue))
***************
*** 5192,5197 ****
--- 5236,5242 ----
X          }
X          p++;
X        }
+       packets=q-pixels;
X        break;
X      }
X      case '5':
***************
*** 5210,5229 ****
X      }
X      case '6':
X      {
X        /*
X          Convert image to a PNM image.
X        */
X        (void) fprintf(image->file,"%d\n",MaxRGB);
!       for (i=0; i < image->packets; i++)
!       {
!         for (j=0; j <= ((int) p->length); j++)
X          {
!           *q++=p->red;
!           *q++=p->green;
!           *q++=p->blue;
X          }
!         p++;
!       }
X        break;
X      }
X    }
--- 5255,5290 ----
X      }
X      case '6':
X      {
+       unsigned short int
+         index;
+ 
X        /*
X          Convert image to a PNM image.
X        */
X        (void) fprintf(image->file,"%d\n",MaxRGB);
!       if (image->class == DirectClass)
!         for (i=0; i < image->packets; i++)
X          {
!           for (j=0; j <= ((int) p->length); j++)
!           {
!             *q++=p->red;
!             *q++=p->green;
!             *q++=p->blue;
!           }
!           p++;
X          }
!       else
!         for (i=0; i < image->packets; i++)
!         {
!           for (j=0; j <= ((int) p->length); j++)
!           {
!             index=p->index;
!             *q++=image->colormap[index].red;
!             *q++=image->colormap[index].green;
!             *q++=image->colormap[index].blue;
!           }
!           p++;
!         }
X        break;
X      }
X    }
***************
*** 6565,6570 ****
--- 6626,6637 ----
X            ReadGRAYImage(alien_info);
X        break;
X      }
+     case 'H':
+     {
+       Warning("Cannot read HISTOGRAM images",alien_info->filename);
+       image=ReadImage(alien_info->filename);
+       break;
+     }
X      case 'J':
X      {
X        image=ReadJPEGImage(alien_info);
***************
*** 6776,6781 ****
--- 6843,6853 ----
X          status=WriteGIFImage(&alien_image);
X        else
X          status=WriteGRAYImage(&alien_image);
+       break;
+     }
+     case 'H':
+     {
+       status=WriteHISTOGRAMImage(&alien_image);
X        break;
X      }
X      case 'J':
diff -r -c ImageMagick/animate.c ImageMagick2.2.1/animate.c
*** ImageMagick/animate.c	Tue Dec  8 11:13:52 1992
--- ImageMagick2.2.1/animate.c	Fri Dec 18 17:07:27 1992
***************
*** 139,145 ****
X    Global declarations.
X  */
X  char
!   *application_name;
X  
X  /*
X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- 139,145 ----
X    Global declarations.
X  */
X  char
!   *client_name;
X  
X  /*
X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
***************
*** 224,230 ****
X    *message,
X    *qualifier;
X  {
!   (void) fprintf(stderr,"%s: %s",application_name,message);
X    if (qualifier != (char *) NULL)
X      (void) fprintf(stderr," (%s)",qualifier);
X    (void) fprintf(stderr,".\n");
--- 224,230 ----
X    *message,
X    *qualifier;
X  {
!   (void) fprintf(stderr,"%s: %s",client_name,message);
X    if (qualifier != (char *) NULL)
X      (void) fprintf(stderr," (%s)",qualifier);
X    (void) fprintf(stderr,".\n");
***************
*** 306,313 ****
X        (char *) NULL
X      };
X    (void) fprintf(stderr,
!     "Usage: %s [-options ...] file [ [-options ...] file ...]\n",
!     application_name);
X    (void) fprintf(stderr,"\nWhere options include: \n");
X    for (p=options; *p != (char *) NULL; p++)
X      (void) fprintf(stderr,"  %s\n",*p);
--- 306,312 ----
X        (char *) NULL
X      };
X    (void) fprintf(stderr,
!     "Usage: %s [-options ...] file [ [-options ...] file ...]\n",client_name);
X    (void) fprintf(stderr,"\nWhere options include: \n");
X    for (p=options; *p != (char *) NULL; p++)
X      (void) fprintf(stderr,"  %s\n",*p);
***************
*** 619,629 ****
X      *manager_hints;
X  
X    /*
-     Sort images by increasing scene number.
-   */
-   (void) qsort((void *) images,(int) number_scenes,sizeof(Image *),
-     LinearCompare);
-   /*
X      Allocate standard colormap.
X    */
X    if (resource_info->debug)
--- 618,623 ----
***************
*** 689,694 ****
--- 683,697 ----
X    magick_windows[number_windows++]=(&window->popup);
X    for (i=0; i < number_windows; i++)
X      magick_windows[i]->id=(Window) NULL;
+   /*
+     Sort images by increasing scene number.
+   */
+   i=0;
+   for (scene=0; scene < number_scenes; scene++)
+     i+=images[scene]->scene;
+   if (i > 0)
+     (void) qsort((void *) images,(int) number_scenes,sizeof(Image *),
+       LinearCompare);
X    if (resource_info->map_type == (char *) NULL)
X      if ((visual_info->class != TrueColor) &&
X          (visual_info->class != DirectColor))
***************
*** 770,776 ****
X      Initialize class and manager hints.
X    */
X    if (resource_info->name == (char *) NULL)
!     class_hint->res_name=application_name;
X    else
X      class_hint->res_name=resource_info->name;
X    class_hint->res_class=(char *) "ImageMagick";
--- 773,779 ----
X      Initialize class and manager hints.
X    */
X    if (resource_info->name == (char *) NULL)
!     class_hint->res_name=client_name;
X    else
X      class_hint->res_name=resource_info->name;
X    class_hint->res_class=(char *) "ImageMagick";
***************
*** 1488,1494 ****
X    /*
X      Display usage profile if there are no command line arguments.
X    */
!   application_name=(*argv);
X    if (argc < 2)
X      Usage(True);
X    /*
--- 1491,1497 ----
X    /*
X      Display usage profile if there are no command line arguments.
X    */
!   client_name=(*argv);
X    if (argc < 2)
X      Usage(True);
X    /*
***************
*** 1555,1576 ****
X    /*
X      Get user defaults from X resource database.
X    */
!   XGetResourceInfo(resource_database,application_name,&resource_info);
!   clip_geometry=XGetResource(resource_database,application_name,"clipGeometry",
!     "ClipGeometry",(char *) NULL);
!   resource_value=XGetResource(resource_database,application_name,"gamma",
!     (char *) NULL,"0.0");
X    gamma=atof(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"reflect",
!     (char *) NULL,"False");
X    reflect=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"rotate",
!     (char *) NULL,"0");
X    degrees=atoi(resource_value);
!   scale_geometry=XGetResource(resource_database,application_name,
!     "scaleGeometry","ScaleGeometry",(char *) NULL);
!   resource_value=XGetResource(resource_database,application_name,"verbose",
!     (char *) NULL,"False");
X    verbose=IsTrue(resource_value);
X    /*
X      Parse command line.
--- 1558,1575 ----
X    /*
X      Get user defaults from X resource database.
X    */
!   XGetResourceInfo(resource_database,client_name,&resource_info);
!   clip_geometry=
!     XGetResource(resource_database,client_name,"clipGeometry",(char *) NULL);
!   resource_value=XGetResource(resource_database,client_name,"gamma","0.0");
X    gamma=atof(resource_value);
!   resource_value=XGetResource(resource_database,client_name,"reflect","False");
X    reflect=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,client_name,"rotate","0");
X    degrees=atoi(resource_value);
!   scale_geometry=
!     XGetResource(resource_database,client_name,"scaleGeometry",(char *) NULL);
!   resource_value=XGetResource(resource_database,client_name,"verbose","False");
X    verbose=IsTrue(resource_value);
X    /*
X      Parse command line.
***************
*** 2036,2042 ****
X                  Initialize image error attributes.
X                */
X                if (image->class == DirectClass)
!                 image->colors=NumberColors(image);
X                total_colors=image->colors;
X              }
X            if (resource_info.colorspace == GRAYColorspace)
--- 2035,2041 ----
X                  Initialize image error attributes.
X                */
X                if (image->class == DirectClass)
!                 image->colors=NumberColors(image,(FILE *) NULL);
X                total_colors=image->colors;
X              }
X            if (resource_info.colorspace == GRAYColorspace)
diff -r -c ImageMagick/animate.man ImageMagick2.2.1/animate.man
*** ImageMagick/animate.man	Mon Dec  7 19:52:59 1992
--- ImageMagick2.2.1/animate.man	Fri Dec 18 17:07:31 1992
***************
*** 185,190 ****
--- 185,193 ----
X  .TP 5
X  .B "-rotate \fIdegrees\fP"
X  apply Paeth image rotation to the image.
+ 
+ Empty triangles left over from rotating the image are filled with
+ the color defined by the pixel at location (0,0).
X  .TP 5
X  .B "-scale \fI<width factor>x<height factor>\fP"
X  preferred size factors of the image.
***************
*** 195,202 ****
X  one factor is specified, both the width and height factors assume the
X  value.
X  
! Factors may be fractional.  For example, a factor of 1.5 will increase the
! image size by one and one-half.
X  
X  The equivalent X resource for this option is \fBscaleGeometry\fP
X  (class \fBScaleGeometry\fP).  See \fBX RESOURCES\fP for details.
--- 198,206 ----
X  one factor is specified, both the width and height factors assume the
X  value.
X  
! Factors may be fractional.  To increase the size of an image, use a
! scale factor greater than 1.0.  To decrease an image's size, use a
! scale factor less than 1.0.  Default is 1.0.
X  
X  The equivalent X resource for this option is \fBscaleGeometry\fP
X  (class \fBScaleGeometry\fP).  See \fBX RESOURCES\fP for details.
diff -r -c ImageMagick/colors.c ImageMagick2.2.1/colors.c
*** ImageMagick/colors.c	Mon Dec  7 09:14:54 1992
--- ImageMagick2.2.1/colors.c	Fri Dec 18 17:07:27 1992
***************
*** 66,74 ****
--- 66,78 ----
X      *child[8];
X  
X    unsigned char
+     level,
X      mid_red,
X      mid_green,
X      mid_blue;
+ 
+   unsigned long int
+     number_colors;
X  } Node;
X  
X  typedef struct _Nodes
***************
*** 83,90 ****
X  typedef struct _Cube
X  {
X    Node
!     *root,
!     *leaf;
X  
X    unsigned int
X      colors;
--- 87,93 ----
X  typedef struct _Cube
X  {
X    Node
!     *root;
X  
X    unsigned int
X      colors;
***************
*** 109,115 ****
X    External declarations.
X  */
X  extern char
!   *application_name;
X  
X  /*
X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- 112,118 ----
X    External declarations.
X  */
X  extern char
!   *client_name;
X  
X  /*
X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
***************
*** 116,121 ****
--- 119,170 ----
X  %                                                                             %
X  %                                                                             %
X  %                                                                             %
+ %  H i s t o g r a m                                                          %
+ %                                                                             %
+ %                                                                             %
+ %                                                                             %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ %  Procedure Histogram traverses the color cube tree and produces a list of
+ %  unique pixel field values and the number of times each occurs in the image.
+ %
+ %  The format of the Histogram routine is:
+ %
+ %      Histogram(node,file)
+ %
+ %  A description of each parameter follows.
+ %
+ %    o node: The address of a structure of type Node which points to a
+ %      node in the color cube tree that is to be pruned.
+ %
+ %
+ */
+ static void Histogram(node,file)
+ register Node
+   *node;
+ 
+ FILE
+   *file;
+ {
+   register unsigned int
+     id;
+ 
+   /*
+     Traverse any children.
+   */
+   for (id=0; id < 8; id++)
+     if (node->child[id] != (Node *) NULL)
+       Histogram(node->child[id],file);
+   if (node->level == MaxTreeDepth)
+     (void) fprintf(file,"%8d\t%d\t%d\t%d\n",node->number_colors,
+       node->mid_red,node->mid_green,node->mid_blue);
+ }
+ 
+ /*
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %                                                                             %
+ %                                                                             %
+ %                                                                             %
X  %  I n i t i a l i z e N o d e                                                %
X  %                                                                             %
X  %                                                                             %
***************
*** 127,136 ****
X  %
X  %  The format of the InitializeNode routine is:
X  %
! %      node=InitializeNode(mid_red,mid_green,mid_blue)
X  %
X  %  A description of each parameter follows.
X  %
X  %    o mid_red: Specifies the mid point of the red axis for this node.
X  %
X  %    o mid_green: Specifies the mid point of the green axis for this node.
--- 176,187 ----
X  %
X  %  The format of the InitializeNode routine is:
X  %
! %      node=InitializeNode(level,mid_red,mid_green,mid_blue)
X  %
X  %  A description of each parameter follows.
X  %
+ %    o level: Specifies the level in the classification the node resides.
+ %
X  %    o mid_red: Specifies the mid point of the red axis for this node.
X  %
X  %    o mid_green: Specifies the mid point of the green axis for this node.
***************
*** 139,146 ****
X  %
X  %
X  */
! static Node *InitializeNode(mid_red,mid_green,mid_blue)
! register unsigned char
X    mid_red,
X    mid_green,
X    mid_blue;
--- 190,198 ----
X  %
X  %
X  */
! static Node *InitializeNode(level,mid_red,mid_green,mid_blue)
! unsigned int
!   level,
X    mid_red,
X    mid_green,
X    mid_blue;
***************
*** 171,179 ****
--- 223,233 ----
X    node=cube.node++;
X    for (i=0; i < 8; i++)
X      node->child[i]=(Node *) NULL;
+   node->level=level;
X    node->mid_red=mid_red;
X    node->mid_green=mid_green;
X    node->mid_blue=mid_blue;
+   node->number_colors=0;
X    return(node);
X  }
X  
***************
*** 192,198 ****
X  %
X  %  The format of the NumberColors routine is:
X  %
! %      number_colors=NumberColors(image)
X  %
X  %  A description of each parameter follows.
X  %
--- 246,252 ----
X  %
X  %  The format of the NumberColors routine is:
X  %
! %      number_colors=NumberColors(image,file)
X  %
X  %  A description of each parameter follows.
X  %
***************
*** 201,211 ****
X  %      run-length counts in the source image must be equal to or exceed
X  %      the number of pixels.
X  %
X  %
X  */
! unsigned int NumberColors(image)
X  Image
X    *image;
X  {
X    Nodes
X      *nodes;
--- 255,273 ----
X  %      run-length counts in the source image must be equal to or exceed
X  %      the number of pixels.
X  %
+ %    o file:  An pointer to a FILE.  If it is non-null a list of unique pixel
+ %      field values and the number of times each occurs in the image is 
+ %      written to the file.
+ %      
X  %
+ %
X  */
! unsigned int NumberColors(image,file)
X  Image
X    *image;
+ 
+ FILE
+   *file;
X  {
X    Nodes
X      *nodes;
***************
*** 219,231 ****
X    register Node
X      *node;
X  
-   register unsigned char
-     bisect,
-     id;
- 
X    register unsigned int
X      level;
X  
X    /*
X      Initialize color description tree.
X    */
--- 281,294 ----
X    register Node
X      *node;
X  
X    register unsigned int
+     count,
+     id,
X      level;
X  
+   unsigned int
+     bisect;
+ 
X    /*
X      Initialize color description tree.
X    */
***************
*** 232,240 ****
X    cube.node_list=(Nodes *) NULL;
X    cube.colors=0;
X    cube.free_nodes=0;
!   cube.root=InitializeNode(MaxRGB >> 1,MaxRGB >> 1,MaxRGB >> 1);
!   cube.leaf=InitializeNode(0,0,0);
!   if ((cube.root == (Node *) NULL) || (cube.leaf == (Node *) NULL))
X      {
X        Warning("unable to count colors","memory allocation failed");
X        return(0);
--- 295,302 ----
X    cube.node_list=(Nodes *) NULL;
X    cube.colors=0;
X    cube.free_nodes=0;
!   cube.root=InitializeNode(0,(MaxRGB+1) >> 1,(MaxRGB+1) >> 1,(MaxRGB+1) >> 1);
!   if (cube.root == (Node *) NULL)
X      {
X        Warning("unable to count colors","memory allocation failed");
X        return(0);
***************
*** 245,252 ****
X      /*
X        Start at the root and proceed level by level.
X      */
X      node=cube.root;
!     for (level=1; level < MaxTreeDepth; level++)
X      {
X        id=(p->red >= node->mid_red ? 1 : 0) |
X          (p->green >= node->mid_green ? 1 : 0) << 1 |
--- 307,315 ----
X      /*
X        Start at the root and proceed level by level.
X      */
+     count=p->length+1;
X      node=cube.root;
!     for (level=1; level <= MaxTreeDepth; level++)
X      {
X        id=(p->red >= node->mid_red ? 1 : 0) |
X          (p->green >= node->mid_green ? 1 : 0) << 1 |
***************
*** 253,263 ****
X          (p->blue >= node->mid_blue ? 1 : 0) << 2;
X        if (node->child[id] == (Node *) NULL)
X          {
!           bisect=(unsigned int) (1 << (MaxTreeDepth-level)) >> 1;
!           node->child[id]=InitializeNode(
!             node->mid_red+(id & 1 ? bisect : -bisect),
!             node->mid_green+(id & 2 ? bisect : -bisect),
!             node->mid_blue+(id & 4 ? bisect : -bisect));
X            if (node->child[id] == (Node *) NULL)
X              {
X                Warning("unable to count colors","memory allocation failed");
--- 316,334 ----
X          (p->blue >= node->mid_blue ? 1 : 0) << 2;
X        if (node->child[id] == (Node *) NULL)
X          {
!           if (level == MaxTreeDepth)
!             {
!               node->child[id]=InitializeNode(level,p->red,p->green,p->blue);
!               cube.colors++;
!             }
!           else
!             {
!               bisect=(unsigned int) (1 << (MaxTreeDepth-level)) >> 1;
!               node->child[id]=InitializeNode(level,
!                 node->mid_red+(id & 1 ? bisect : -bisect),
!                 node->mid_green+(id & 2 ? bisect : -bisect),
!                 node->mid_blue+(id & 4 ? bisect : -bisect));
!             }
X            if (node->child[id] == (Node *) NULL)
X              {
X                Warning("unable to count colors","memory allocation failed");
***************
*** 266,281 ****
X          }
X        node=node->child[id];
X      }
!     id=(p->red >= node->mid_red ? 1 : 0) |
!       (p->green >= node->mid_green ? 1 : 0) << 1 |
!       (p->blue >= node->mid_blue ? 1 : 0) << 2;
!     if (node->child[id] == (Node *) NULL)
!       {
!         node->child[id]=cube.leaf;
!         cube.colors++;
!       }
X      p++;
X    }
X    /*
X      Release color cube tree storage.
X    */
--- 337,347 ----
X          }
X        node=node->child[id];
X      }
!     node->number_colors+=count;
X      p++;
X    }
+   if (file != (FILE *) NULL)
+     Histogram(cube.root,file);
X    /*
X      Release color cube tree storage.
X    */
diff -r -c ImageMagick/compress.c ImageMagick2.2.1/compress.c
*** ImageMagick/compress.c	Mon Dec  7 09:15:08 1992
--- ImageMagick2.2.1/compress.c	Fri Dec 18 17:07:27 1992
***************
*** 159,165 ****
X    External declarations.
X  */
X  extern char
!   *application_name;
X  
X  /*
X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- 159,165 ----
X    External declarations.
X  */
X  extern char
!   *client_name;
X  
X  /*
X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
***************
*** 1091,1097 ****
X            else
X              displacement=MaxHashTable-k;
X            next_pixel=False;
!           while (1)
X            {
X              k-=displacement;
X              if (k < 0)
--- 1091,1097 ----
X            else
X              displacement=MaxHashTable-k;
X            next_pixel=False;
!           for ( ; ; )
X            {
X              k-=displacement;
X              if (k < 0)
diff -r -c ImageMagick/display.c ImageMagick2.2.1/display.c
*** ImageMagick/display.c	Tue Dec  8 11:13:21 1992
--- ImageMagick2.2.1/display.c	Mon Dec 21 14:12:34 1992
***************
*** 160,166 ****
X    Global declarations.
X  */
X  char
!   *application_name;
X  
X  /*
X    Forward declarations.
--- 160,166 ----
X    Global declarations.
X  */
X  char
!   *client_name;
X  
X  /*
X    Forward declarations.
***************
*** 218,224 ****
X    *message,
X    *qualifier;
X  {
!   (void) fprintf(stderr,"%s: %s",application_name,message);
X    if (qualifier != (char *) NULL)
X      (void) fprintf(stderr," (%s)",qualifier);
X    (void) fprintf(stderr,".\n");
--- 218,224 ----
X    *message,
X    *qualifier;
X  {
!   (void) fprintf(stderr,"%s: %s",client_name,message);
X    if (qualifier != (char *) NULL)
X      (void) fprintf(stderr," (%s)",qualifier);
X    (void) fprintf(stderr,".\n");
***************
*** 315,322 ****
X        (char *) NULL
X      };
X    (void) fprintf(stderr,
!     "Usage: %s [-options ...] file [ [-options ...] file ...]\n",
!     application_name);
X    (void) fprintf(stderr,"\nWhere options include: \n");
X    for (p=options; *p != (char *) NULL; p++)
X      (void) fprintf(stderr,"  %s\n",*p);
--- 315,321 ----
X        (char *) NULL
X      };
X    (void) fprintf(stderr,
!     "Usage: %s [-options ...] file [ [-options ...] file ...]\n",client_name);
X    (void) fprintf(stderr,"\nWhere options include: \n");
X    for (p=options; *p != (char *) NULL; p++)
X      (void) fprintf(stderr,"  %s\n",*p);
***************
*** 2609,2615 ****
X      Initialize class and manager hints.
X    */
X    if (resource_info->name == (char *) NULL)
!     class_hint->res_name=application_name;
X    else
X      class_hint->res_name=resource_info->name;
X    class_hint->res_class=(char *) "ImageMagick";
--- 2608,2614 ----
X      Initialize class and manager hints.
X    */
X    if (resource_info->name == (char *) NULL)
!     class_hint->res_name=client_name;
X    else
X      class_hint->res_name=resource_info->name;
X    class_hint->res_class=(char *) "ImageMagick";
***************
*** 3203,3208 ****
--- 3202,3215 ----
X        }
X        case KeyPress:
X        {
+         if (*state & ReconfigureImageState)
+           {
+             /*
+               No key press during image reconfiguration.
+             */
+             XBell(display,0);
+             break;
+           }
X          /*
X            Respond to a user key press.
X          */
***************
*** 3415,3420 ****
--- 3422,3428 ----
X        /*
X          Update panning icon configuration.
X        */
+       window->pan.clip_geometry=window->image.clip_geometry;
X        XBestIconSize(display,&window->pan,displayed_image);
X        window_changes.width=window->pan.width;
X        window_changes.height=window->pan.height;
***************
*** 3435,3440 ****
--- 3443,3449 ----
X        /*
X          Update icon configuration.
X        */
+       window->icon.clip_geometry=window->image.clip_geometry;
X        XBestIconSize(display,&window->icon,displayed_image);
X        window_changes.width=window->icon.width;
X        window_changes.height=window->icon.height;
***************
*** 4913,4919 ****
X    /*
X      Display usage profile if there are no command line arguments.
X    */
!   application_name=(*argv);
X    if (argc < 2)
X      Usage(True);
X    /*
--- 4922,4928 ----
X    /*
X      Display usage profile if there are no command line arguments.
X    */
!   client_name=(*argv);
X    if (argc < 2)
X      Usage(True);
X    /*
***************
*** 4967,4973 ****
X      Initialize resource database.
X    */
X    XrmInitialize();
!   XGetDefault(display,application_name,"dummy");
X    resource_database=XrmGetDatabase(display);
X    resource_value=XResourceManagerString(display);
X    if (resource_value == (char *) NULL)
--- 4976,4982 ----
X      Initialize resource database.
X    */
X    XrmInitialize();
!   XGetDefault(display,client_name,"dummy");
X    resource_database=XrmGetDatabase(display);
X    resource_value=XResourceManagerString(display);
X    if (resource_value == (char *) NULL)
***************
*** 4977,5022 ****
X    /*
X      Get user defaults from X resource database.
X    */
!   XGetResourceInfo(resource_database,application_name,&resource_info);
!   clip_geometry=XGetResource(resource_database,application_name,"clipGeometry",
!     "ClipGeometry",(char *) NULL);
!   resource_value=XGetResource(resource_database,application_name,"compression",
!     (char *) NULL,"RunlengthEncoded");
X    if (Latin1Compare("qencoded",resource_value) == 0)
X      compression=QEncodedCompression;
X    else
X      compression=RunlengthEncodedCompression;
!   resource_value=XGetResource(resource_database,application_name,"enhance",
!     (char *) NULL,"False");
X    enhance=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"gamma",
!     (char *) NULL,"0.0");
X    gamma=atof(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"inverse",
!     (char *) NULL,"False");
X    inverse=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"noise",
!     (char *) NULL,"False");
X    noise=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"normalize",
!     (char *) NULL,"False");
X    normalize=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"reflect",
!     (char *) NULL,"False");
X    reflect=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"rotate",
!     (char *) NULL,"0");
X    degrees=atoi(resource_value);
!   scale_geometry=XGetResource(resource_database,application_name,
!     "scaleGeometry","ScaleGeometry",(char *) NULL);
!   resource_value=XGetResource(resource_database,application_name,"scene",
!     (char *) NULL,"0");
X    scene=atoi(resource_value);
!   resource_value=XGetResource(resource_database,application_name,"verbose",
!     (char *) NULL,"False");
X    verbose=IsTrue(resource_value);
!   window_id=XGetResource(resource_database,application_name,"windowId",
!     "WindowId",(char *) NULL);
X    /*
X      Parse command line.
X    */
--- 4986,5023 ----
X    /*
X      Get user defaults from X resource database.
X    */
!   XGetResourceInfo(resource_database,client_name,&resource_info);
!   clip_geometry=
!     XGetResource(resource_database,client_name,"clipGeometry",(char *) NULL);
!   resource_value=XGetResource(resource_database,client_name,"compression",
!     "RunlengthEncoded");
X    if (Latin1Compare("qencoded",resource_value) == 0)
X      compression=QEncodedCompression;
X    else
X      compression=RunlengthEncodedCompression;
!   resource_value=XGetResource(resource_database,client_name,"enhance","False");
X    enhance=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,client_name,"gamma","0.0");
X    gamma=atof(resource_value);
!   resource_value=XGetResource(resource_database,client_name,"inverse","False");
X    inverse=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,client_name,"noise","False");
X    noise=IsTrue(resource_value);
!   resource_value=
!     XGetResource(resource_database,client_name,"normalize","False");
X    normalize=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,client_name,"reflect","False");
X    reflect=IsTrue(resource_value);
!   resource_value=XGetResource(resource_database,client_name,"rotate","0");
X    degrees=atoi(resource_value);
!   scale_geometry=
!     XGetResource(resource_database,client_name,"scaleGeometry",(char *) NULL);
SHAR_EOF
true || echo 'restore of fix-01 failed'
fi
echo 'End of ImageMagick/patch01 part 1'
echo 'File fix-01 is continued in part 2'
echo 2 > _shar_seq_.tmp
exit 0
-- 
cristy@dupont.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads