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

« back to all changes in this revision

Viewing changes to wand/pixel-wand.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:
62
62
*/
63
63
struct _PixelWand
64
64
{
65
 
  size_t
 
65
  unsigned long
66
66
    id;
67
67
 
68
68
  char
74
74
  MagickPixelPacket
75
75
    pixel;
76
76
 
77
 
  size_t
 
77
  unsigned long
78
78
    count;
79
79
 
80
80
  MagickBooleanType
81
81
    debug;
82
82
 
83
 
  size_t
 
83
  unsigned long
84
84
    signature;
85
85
};
86
86
 
154
154
      wand->name);
155
155
  (void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
156
156
  clone_wand->id=AcquireWandId();
157
 
  (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%.20g",
158
 
    PixelWandId,(double) clone_wand->id);
 
157
  (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%lu",PixelWandId,
 
158
    clone_wand->id);
159
159
  clone_wand->exception=AcquireExceptionInfo();
160
160
  InheritException(clone_wand->exception,wand->exception);
161
161
  clone_wand->pixel=wand->pixel;
183
183
%  The format of the ClonePixelWands method is:
184
184
%
185
185
%      PixelWand **ClonePixelWands(const PixelWand **wands,
186
 
%        const size_t number_wands)
 
186
%        const unsigned long number_wands)
187
187
%
188
188
%  A description of each parameter follows:
189
189
%
193
193
%
194
194
*/
195
195
WandExport PixelWand **ClonePixelWands(const PixelWand **wands,
196
 
  const size_t number_wands)
 
196
  const unsigned long number_wands)
197
197
{
198
 
  register ssize_t
 
198
  register long
199
199
    i;
200
200
 
201
201
  PixelWand
206
206
  if (clone_wands == (PixelWand **) NULL)
207
207
    ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
208
208
      GetExceptionMessage(errno));
209
 
  for (i=0; i < (ssize_t) number_wands; i++)
 
209
  for (i=0; i < (long) number_wands; i++)
210
210
    clone_wands[i]=ClonePixelWand(wands[i]);
211
211
  return(clone_wands);
212
212
}
263
263
%  The format of the DestroyPixelWands method is:
264
264
%
265
265
%      PixelWand **DestroyPixelWands(PixelWand **wand,
266
 
%        const size_t number_wands)
 
266
%        const unsigned long number_wands)
267
267
%
268
268
%  A description of each parameter follows:
269
269
%
273
273
%
274
274
*/
275
275
WandExport PixelWand **DestroyPixelWands(PixelWand **wand,
276
 
  const size_t number_wands)
 
276
  const unsigned long number_wands)
277
277
{
278
 
  register ssize_t
 
278
  register long
279
279
    i;
280
280
 
281
281
  assert(wand != (PixelWand **) NULL);
283
283
  assert((*wand)->signature == WandSignature);
284
284
  if ((*wand)->debug != MagickFalse)
285
285
    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",(*wand)->name);
286
 
  for (i=(ssize_t) number_wands-1; i >= 0; i--)
 
286
  for (i=(long) number_wands-1; i >= 0; i--)
287
287
    wand[i]=DestroyPixelWand(wand[i]);
288
288
  wand=(PixelWand **) RelinquishMagickMemory(wand);
289
289
  return(wand);
393
393
  PixelWand
394
394
    *wand;
395
395
 
396
 
  size_t
 
396
  unsigned long
397
397
    depth;
398
398
 
399
399
  depth=MAGICKCORE_QUANTUM_DEPTH;
406
406
      GetExceptionMessage(errno));
407
407
  (void) ResetMagickMemory(wand,0,sizeof(*wand));
408
408
  wand->id=AcquireWandId();
409
 
  (void) FormatMagickString(wand->name,MaxTextExtent,"%s-%.20g",PixelWandId,
410
 
    (double) wand->id);
 
409
  (void) FormatMagickString(wand->name,MaxTextExtent,"%s-%lu",PixelWandId,
 
410
    wand->id);
411
411
  wand->exception=AcquireExceptionInfo();
412
412
  GetMagickPixelPacket((Image *) NULL,&wand->pixel);
413
413
  wand->debug=IsEventLogging();
432
432
%
433
433
%  The format of the NewPixelWands method is:
434
434
%
435
 
%      PixelWand **NewPixelWands(const size_t number_wands)
 
435
%      PixelWand **NewPixelWands(const unsigned long number_wands)
436
436
%
437
437
%  A description of each parameter follows:
438
438
%
439
439
%    o number_wands: the number of wands.
440
440
%
441
441
*/
442
 
WandExport PixelWand **NewPixelWands(const size_t number_wands)
 
442
WandExport PixelWand **NewPixelWands(const unsigned long number_wands)
443
443
{
444
 
  register ssize_t
 
444
  register long
445
445
    i;
446
446
 
447
447
  PixelWand
452
452
  if (wands == (PixelWand **) NULL)
453
453
    ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
454
454
      GetExceptionMessage(errno));
455
 
  for (i=0; i < (ssize_t) number_wands; i++)
 
455
  for (i=0; i < (long) number_wands; i++)
456
456
    wands[i]=NewPixelWand();
457
457
  return(wands);
458
458
}
775
775
%
776
776
%  The format of the PixelGetColorCount method is:
777
777
%
778
 
%      size_t PixelGetColorCount(const PixelWand *wand)
 
778
%      unsigned long PixelGetColorCount(const PixelWand *wand)
779
779
%
780
780
%  A description of each parameter follows:
781
781
%
782
782
%    o wand: the pixel wand.
783
783
%
784
784
*/
785
 
WandExport size_t PixelGetColorCount(const PixelWand *wand)
 
785
WandExport unsigned long PixelGetColorCount(const PixelWand *wand)
786
786
{
787
787
  assert(wand != (const PixelWand *) NULL);
788
788
  assert(wand->signature == WandSignature);
1694
1694
%
1695
1695
%  The format of the PixelSetColorCount method is:
1696
1696
%
1697
 
%      void PixelSetColorCount(PixelWand *wand,const size_t count)
 
1697
%      void PixelSetColorCount(PixelWand *wand,const unsigned long count)
1698
1698
%
1699
1699
%  A description of each parameter follows:
1700
1700
%
1703
1703
%    o count: the number of this particular color.
1704
1704
%
1705
1705
*/
1706
 
WandExport void PixelSetColorCount(PixelWand *wand,const size_t count)
 
1706
WandExport void PixelSetColorCount(PixelWand *wand,const unsigned long count)
1707
1707
{
1708
1708
  assert(wand != (const PixelWand *) NULL);
1709
1709
  assert(wand->signature == WandSignature);