~ubuntu-branches/ubuntu/oneiric/imagemagick/oneiric-updates

« back to all changes in this revision

Viewing changes to coders/pes.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-06-15 11:05:28 UTC
  • mfrom: (6.2.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110615110528-08jgo07a4846xh8d
Tags: 8:6.6.0.4-3ubuntu1
* Resynchronise with Debian (LP: #797595).  Remaining changes:
  - Make ufraw-batch (universe) a suggestion instead of a recommendation.
  - Make debian/rules install target depend on check; they cannot reliably
    be run in parallel.
  - Don't set MAKEFLAGS in debian/rules; just pass it to the build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
452
452
  SegmentInfo
453
453
    bounds;
454
454
 
455
 
  register ssize_t
 
455
  register long
456
456
    i;
457
457
 
458
458
  ssize_t
463
463
    magick[4],
464
464
    version[4];
465
465
 
466
 
  size_t
 
466
  unsigned long
467
467
    number_blocks,
468
468
    number_colors,
469
469
    number_stitches;
501
501
  /*
502
502
    Get PES colors.
503
503
  */
504
 
  number_colors=(size_t) ReadBlobByte(image)+1;
505
 
  for (i=0; i < (ssize_t) number_colors; i++)
 
504
  number_colors=(unsigned long) ReadBlobByte(image)+1;
 
505
  for (i=0; i < (long) number_colors; i++)
506
506
  {
507
507
    j=(int) ReadBlobByte(image);
508
508
    blocks[i].color=PESColor+j;
510
510
  }
511
511
  for ( ; i < 256L; i++)
512
512
    blocks[i].offset=0;
513
 
  for (i=0; i < (ssize_t) (532L-number_colors-21); i++)
 
513
  for (i=0; i < (long) (532L-number_colors-21); i++)
514
514
    if (ReadBlobByte(image) == EOF)
515
515
      break;
516
516
  if (EOFBlob(image) != MagickFalse)
602
602
    if ((double) y > bounds.y2)
603
603
      bounds.y2=(double) y;
604
604
    i++;
605
 
    if (i >= (ssize_t) number_stitches)
 
605
    if (i >= (long) number_stitches)
606
606
      {
607
607
        /*
608
608
          Make room for more stitches.
616
616
  }
617
617
  j++;
618
618
  blocks[j].offset=(ssize_t) i;
619
 
  number_blocks=(size_t) j;
 
619
  number_blocks=(unsigned long) j;
620
620
  /*
621
621
    Write stitches as SVG file.
622
622
  */
632
632
    "ev=\"http://www.w3.org/2001/xml-events\" version=\"1.1\" "
633
633
    "baseProfile=\"full\" width=\"%g\" height=\"%g\">\n",bounds.x2-bounds.x1,
634
634
    bounds.y2-bounds.y1);
635
 
  for (i=0; i < (ssize_t) number_blocks; i++)
 
635
  for (i=0; i < (long) number_blocks; i++)
636
636
  {
637
637
    offset=blocks[i].offset;
638
638
    (void) fprintf(file,"  <path stroke=\"#%02x%02x%02x\" fill=\"none\" "
639
639
      "d=\"M %g %g",blocks[i].color->red,blocks[i].color->green,
640
640
      blocks[i].color->blue,stitches[offset].x-bounds.x1,
641
641
      stitches[offset].y-bounds.y1);
642
 
    for (j=1; j < (ssize_t) (blocks[i+1].offset-offset); j++)
 
642
    for (j=1; j < (long) (blocks[i+1].offset-offset); j++)
643
643
      (void) fprintf(file," L %g %g",stitches[offset+j].x-bounds.x1,
644
644
        stitches[offset+j].y-bounds.y1);
645
645
    (void) fprintf(file,"\"/>\n");
689
689
%
690
690
%  The format of the RegisterPESImage method is:
691
691
%
692
 
%      size_t RegisterPESImage(void)
 
692
%      unsigned long RegisterPESImage(void)
693
693
%
694
694
*/
695
 
ModuleExport size_t RegisterPESImage(void)
 
695
ModuleExport unsigned long RegisterPESImage(void)
696
696
{
697
697
  MagickInfo
698
698
    *entry;