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

« back to all changes in this revision

Viewing changes to magick/policy.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:
88
88
  SemaphoreInfo
89
89
    *semaphore;
90
90
 
91
 
  size_t
 
91
  unsigned long
92
92
    signature;
93
93
};
94
94
 
224
224
%  The format of the GetPolicyInfoList function is:
225
225
%
226
226
%      const PolicyInfo **GetPolicyInfoList(const char *pattern,
227
 
%        size_t *number_policies,ExceptionInfo *exception)
 
227
%        unsigned long *number_policies,ExceptionInfo *exception)
228
228
%
229
229
%  A description of each parameter follows:
230
230
%
236
236
%
237
237
*/
238
238
MagickExport const PolicyInfo **GetPolicyInfoList(const char *pattern,
239
 
  size_t *number_policies,ExceptionInfo *exception)
 
239
  unsigned long *number_policies,ExceptionInfo *exception)
240
240
{
241
241
  const PolicyInfo
242
242
    **policies;
244
244
  register const PolicyInfo
245
245
    *p;
246
246
 
247
 
  register ssize_t
 
247
  register long
248
248
    i;
249
249
 
250
250
  /*
252
252
  */
253
253
  assert(pattern != (char *) NULL);
254
254
  (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",pattern);
255
 
  assert(number_policies != (size_t *) NULL);
 
255
  assert(number_policies != (unsigned long *) NULL);
256
256
  *number_policies=0;
257
257
  p=GetPolicyInfo("*",exception);
258
258
  if (p == (const PolicyInfo *) NULL)
276
276
  }
277
277
  UnlockSemaphoreInfo(policy_semaphore);
278
278
  policies[i]=(PolicyInfo *) NULL;
279
 
  *number_policies=(size_t) i;
 
279
  *number_policies=(unsigned long) i;
280
280
  return(policies);
281
281
}
282
282
 
295
295
%
296
296
%  The format of the GetPolicyList function is:
297
297
%
298
 
%      char **GetPolicyList(const char *pattern,size_t *number_policies,
 
298
%      char **GetPolicyList(const char *pattern,unsigned long *number_policies,
299
299
%        ExceptionInfo *exception)
300
300
%
301
301
%  A description of each parameter follows:
308
308
%
309
309
*/
310
310
MagickExport char **GetPolicyList(const char *pattern,
311
 
  size_t *number_policies,ExceptionInfo *exception)
 
311
  unsigned long *number_policies,ExceptionInfo *exception)
312
312
{
313
313
  char
314
314
    **policies;
316
316
  register const PolicyInfo
317
317
    *p;
318
318
 
319
 
  register ssize_t
 
319
  register long
320
320
    i;
321
321
 
322
322
  /*
324
324
  */
325
325
  assert(pattern != (char *) NULL);
326
326
  (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",pattern);
327
 
  assert(number_policies != (size_t *) NULL);
 
327
  assert(number_policies != (unsigned long *) NULL);
328
328
  *number_policies=0;
329
329
  p=GetPolicyInfo("*",exception);
330
330
  if (p == (const PolicyInfo *) NULL)
348
348
  }
349
349
  UnlockSemaphoreInfo(policy_semaphore);
350
350
  policies[i]=(char *) NULL;
351
 
  *number_policies=(size_t) i;
 
351
  *number_policies=(unsigned long) i;
352
352
  return(policies);
353
353
}
354
354
 
550
550
  const PolicyInfo
551
551
    **policy_info;
552
552
 
553
 
  register ssize_t
 
553
  register long
554
554
    i;
555
555
 
556
 
  size_t
 
556
  unsigned long
557
557
    number_policies;
558
558
 
559
559
  /*
565
565
  if (policy_info == (const PolicyInfo **) NULL)
566
566
    return(MagickFalse);
567
567
  path=(const char *) NULL;
568
 
  for (i=0; i < (ssize_t) number_policies; i++)
 
568
  for (i=0; i < (long) number_policies; i++)
569
569
  {
570
570
    if (policy_info[i]->stealth != MagickFalse)
571
571
      continue;
624
624
%  The format of the LoadPolicyList method is:
625
625
%
626
626
%      MagickBooleanType LoadPolicyList(const char *xml,const char *filename,
627
 
%        const size_t depth,ExceptionInfo *exception)
 
627
%        const unsigned long depth,ExceptionInfo *exception)
628
628
%
629
629
%  A description of each parameter follows:
630
630
%
638
638
%
639
639
*/
640
640
static MagickBooleanType LoadPolicyList(const char *xml,const char *filename,
641
 
  const size_t depth,ExceptionInfo *exception)
 
641
  const unsigned long depth,ExceptionInfo *exception)
642
642
{
643
643
  char
644
644
    keyword[MaxTextExtent],
882
882
  MagickStatusType
883
883
    status;
884
884
 
885
 
  register ssize_t
 
885
  register long
886
886
    i;
887
887
 
888
888
  /*
899
899
          return(MagickFalse);
900
900
        }
901
901
    }
902
 
  for (i=0; i < (ssize_t) (sizeof(PolicyMap)/sizeof(*PolicyMap)); i++)
 
902
  for (i=0; i < (long) (sizeof(PolicyMap)/sizeof(*PolicyMap)); i++)
903
903
  {
904
904
    PolicyInfo
905
905
      *policy_info;