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

« back to all changes in this revision

Viewing changes to tests/validate.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:
65
65
%
66
66
%  The format of the ValidateCompareCommand method is:
67
67
%
68
 
%      size_t ValidateCompareCommand(ImageInfo *image_info,
 
68
%      unsigned long ValidateCompareCommand(ImageInfo *image_info,
69
69
%        const char *reference_filename,const char *output_filename,
70
 
%        size_t *fail,ExceptionInfo *exception)
 
70
%        unsigned long *fail,ExceptionInfo *exception)
71
71
%
72
72
%  A description of each parameter follows:
73
73
%
82
82
%    o exception: return any errors or warnings in this structure.
83
83
%
84
84
*/
85
 
static size_t ValidateCompareCommand(ImageInfo *image_info,
 
85
static unsigned long ValidateCompareCommand(ImageInfo *image_info,
86
86
  const char *reference_filename,const char *output_filename,
87
 
  size_t *fail,ExceptionInfo *exception)
 
87
  unsigned long *fail,ExceptionInfo *exception)
88
88
{
89
89
  char
90
90
    **arguments,
96
96
  MagickBooleanType
97
97
    status;
98
98
 
99
 
  register ssize_t
 
99
  register long
100
100
    i,
101
101
    j;
102
102
 
103
 
  size_t
 
103
  unsigned long
104
104
    test;
105
105
 
106
106
  test=0;
108
108
  for (i=0; compare_options[i] != (char *) NULL; i++)
109
109
  {
110
110
    CatchException(exception);
111
 
    (void) fprintf(stdout,"  test %.20g: %s",(double) (test++),
112
 
      compare_options[i]);
 
111
    (void) fprintf(stdout,"  test %lu: %s",test++,compare_options[i]);
113
112
    (void) FormatMagickString(command,MaxTextExtent,"%s %s %s %s",
114
113
      compare_options[i],reference_filename,reference_filename,output_filename);
115
114
    arguments=StringToArgv(command,&number_arguments);
132
131
      }
133
132
    (void) fprintf(stdout,"... pass.\n");
134
133
  }
135
 
  (void) fprintf(stdout,
136
 
    "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
137
 
    (double) (test-(*fail)),(double) *fail);
 
134
  (void) fprintf(stdout,"  summary: %lu subtests; %lu passed; %lu failed.\n",
 
135
    test,test-(*fail),*fail);
138
136
  return(test);
139
137
}
140
138
 
154
152
%
155
153
%  The format of the ValidateCompositeCommand method is:
156
154
%
157
 
%      size_t ValidateCompositeCommand(ImageInfo *image_info,
 
155
%      unsigned long ValidateCompositeCommand(ImageInfo *image_info,
158
156
%        const char *reference_filename,const char *output_filename,
159
 
%        size_t *fail,ExceptionInfo *exception)
 
157
%        unsigned long *fail,ExceptionInfo *exception)
160
158
%
161
159
%  A description of each parameter follows:
162
160
%
171
169
%    o exception: return any errors or warnings in this structure.
172
170
%
173
171
*/
174
 
static size_t ValidateCompositeCommand(ImageInfo *image_info,
 
172
static unsigned long ValidateCompositeCommand(ImageInfo *image_info,
175
173
  const char *reference_filename,const char *output_filename,
176
 
  size_t *fail,ExceptionInfo *exception)
 
174
  unsigned long *fail,ExceptionInfo *exception)
177
175
{
178
176
  char
179
177
    **arguments,
185
183
  MagickBooleanType
186
184
    status;
187
185
 
188
 
  register ssize_t
 
186
  register long
189
187
    i,
190
188
    j;
191
189
 
192
 
  size_t
 
190
  unsigned long
193
191
    test;
194
192
 
195
193
  test=0;
197
195
  for (i=0; composite_options[i] != (char *) NULL; i++)
198
196
  {
199
197
    CatchException(exception);
200
 
    (void) fprintf(stdout,"  test %.20g: %s",(double) (test++),
201
 
      composite_options[i]);
 
198
    (void) fprintf(stdout,"  test %lu: %s",test++,composite_options[i]);
202
199
    (void) FormatMagickString(command,MaxTextExtent,"%s %s %s %s",
203
200
      reference_filename,composite_options[i],reference_filename,
204
201
      output_filename);
222
219
      }
223
220
    (void) fprintf(stdout,"... pass.\n");
224
221
  }
225
 
  (void) fprintf(stdout,
226
 
    "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
227
 
    (double) (test-(*fail)),(double) *fail);
 
222
  (void) fprintf(stdout,"  summary: %lu subtests; %lu passed; %lu failed.\n",
 
223
    test,test-(*fail),*fail);
228
224
  return(test);
229
225
}
230
226
 
244
240
%
245
241
%  The format of the ValidateConvertCommand method is:
246
242
%
247
 
%      size_t ValidateConvertCommand(ImageInfo *image_info,
 
243
%      unsigned long ValidateConvertCommand(ImageInfo *image_info,
248
244
%        const char *reference_filename,const char *output_filename,
249
 
%        size_t *fail,ExceptionInfo *exception)
 
245
%        unsigned long *fail,ExceptionInfo *exception)
250
246
%
251
247
%  A description of each parameter follows:
252
248
%
261
257
%    o exception: return any errors or warnings in this structure.
262
258
%
263
259
*/
264
 
static size_t ValidateConvertCommand(ImageInfo *image_info,
 
260
static unsigned long ValidateConvertCommand(ImageInfo *image_info,
265
261
  const char *reference_filename,const char *output_filename,
266
 
  size_t *fail,ExceptionInfo *exception)
 
262
  unsigned long *fail,ExceptionInfo *exception)
267
263
{
268
264
  char
269
265
    **arguments,
275
271
  MagickBooleanType
276
272
    status;
277
273
 
278
 
  register ssize_t
 
274
  register long
279
275
    i,
280
276
    j;
281
277
 
282
 
  size_t
 
278
  unsigned long
283
279
    test;
284
280
 
285
281
  test=0;
287
283
  for (i=0; convert_options[i] != (char *) NULL; i++)
288
284
  {
289
285
    CatchException(exception);
290
 
    (void) fprintf(stdout,"  test %.20g: %s",(double) test++,
291
 
      convert_options[i]);
 
286
    (void) fprintf(stdout,"  test %lu: %s",test++,convert_options[i]);
292
287
    (void) FormatMagickString(command,MaxTextExtent,"%s %s %s %s",
293
288
      reference_filename,convert_options[i],reference_filename,output_filename);
294
289
    arguments=StringToArgv(command,&number_arguments);
311
306
      }
312
307
    (void) fprintf(stdout,"... pass.\n");
313
308
  }
314
 
  (void) fprintf(stdout,
315
 
    "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
316
 
    (double) (test-(*fail)),(double) *fail);
 
309
  (void) fprintf(stdout,"  summary: %lu subtests; %lu passed; %lu failed.\n",
 
310
    test,test-(*fail),*fail);
317
311
  return(test);
318
312
}
319
313
 
333
327
%
334
328
%  The format of the ValidateIdentifyCommand method is:
335
329
%
336
 
%      size_t ValidateIdentifyCommand(ImageInfo *image_info,
 
330
%      unsigned long ValidateIdentifyCommand(ImageInfo *image_info,
337
331
%        const char *reference_filename,const char *output_filename,
338
 
%        size_t *fail,ExceptionInfo *exception)
 
332
%        unsigned long *fail,ExceptionInfo *exception)
339
333
%
340
334
%  A description of each parameter follows:
341
335
%
350
344
%    o exception: return any errors or warnings in this structure.
351
345
%
352
346
*/
353
 
static size_t ValidateIdentifyCommand(ImageInfo *image_info,
 
347
static unsigned long ValidateIdentifyCommand(ImageInfo *image_info,
354
348
  const char *reference_filename,const char *output_filename,
355
 
  size_t *fail,ExceptionInfo *exception)
 
349
  unsigned long *fail,ExceptionInfo *exception)
356
350
{
357
351
  char
358
352
    **arguments,
364
358
  MagickBooleanType
365
359
    status;
366
360
 
367
 
  register ssize_t
 
361
  register long
368
362
    i,
369
363
    j;
370
364
 
371
 
  size_t
 
365
  unsigned long
372
366
    test;
373
367
 
374
368
  (void) output_filename;
377
371
  for (i=0; identify_options[i] != (char *) NULL; i++)
378
372
  {
379
373
    CatchException(exception);
380
 
    (void) fprintf(stdout,"  test %.20g: %s",(double) test++,
381
 
      identify_options[i]);
 
374
    (void) fprintf(stdout,"  test %lu: %s",test++,identify_options[i]);
382
375
    (void) FormatMagickString(command,MaxTextExtent,"%s %s",
383
376
      identify_options[i],reference_filename);
384
377
    arguments=StringToArgv(command,&number_arguments);
401
394
      }
402
395
    (void) fprintf(stdout,"... pass.\n");
403
396
  }
404
 
  (void) fprintf(stdout,
405
 
    "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
406
 
    (double) (test-(*fail)),(double) *fail);
 
397
  (void) fprintf(stdout,"  summary: %lu subtests; %lu passed; %lu failed.\n",
 
398
    test,test-(*fail),*fail);
407
399
  return(test);
408
400
}
409
401
 
423
415
%
424
416
%  The format of the ValidateImageFormatsInMemory method is:
425
417
%
426
 
%      size_t ValidateImageFormatsInMemory(ImageInfo *image_info,
 
418
%      unsigned long ValidateImageFormatsInMemory(ImageInfo *image_info,
427
419
%        const char *reference_filename,const char *output_filename,
428
 
%        size_t *fail,ExceptionInfo *exception)
 
420
%        unsigned long *fail,ExceptionInfo *exception)
429
421
%
430
422
%  A description of each parameter follows:
431
423
%
440
432
%    o exception: return any errors or warnings in this structure.
441
433
%
442
434
*/
443
 
static size_t ValidateImageFormatsInMemory(ImageInfo *image_info,
 
435
static unsigned long ValidateImageFormatsInMemory(ImageInfo *image_info,
444
436
  const char *reference_filename,const char *output_filename,
445
 
  size_t *fail,ExceptionInfo *exception)
 
437
  unsigned long *fail,ExceptionInfo *exception)
446
438
{
447
439
  char
448
440
    size[MaxTextExtent];
462
454
  MagickBooleanType
463
455
    status;
464
456
 
465
 
  register ssize_t
 
457
  register long
466
458
    i,
467
459
    j;
468
460
 
472
464
  unsigned char
473
465
    *blob;
474
466
 
475
 
  size_t
 
467
  unsigned long
476
468
    test;
477
469
 
478
470
  test=0;
490
482
        Generate reference image.
491
483
      */
492
484
      CatchException(exception);
493
 
      (void) fprintf(stdout,"  test %.20g: %s/%s/%s/%.20g-bits",(double)
494
 
        (test++),reference_formats[i].magick,MagickOptionToMnemonic(
 
485
      (void) fprintf(stdout,"  test %lu: %s/%s/%s/%lu-bits",test++,
 
486
        reference_formats[i].magick,MagickOptionToMnemonic(
495
487
        MagickCompressOptions,reference_formats[i].compression),
496
488
        MagickOptionToMnemonic(MagickTypeOptions,reference_types[j].type),
497
 
        (double) reference_types[j].depth);
 
489
        reference_types[j].depth);
498
490
      (void) CopyMagickString(image_info->filename,reference_filename,
499
491
        MaxTextExtent);
500
492
      reference_image=ReadImage(image_info,exception);
507
499
      /*
508
500
        Write reference image.
509
501
      */
510
 
      (void) FormatMagickString(size,MaxTextExtent,"%.20gx%.20g",
511
 
        (double) reference_image->columns,(double) reference_image->rows);
 
502
      (void) FormatMagickString(size,MaxTextExtent,"%lux%lu",
 
503
        reference_image->columns,reference_image->rows);
512
504
      (void) CloneString(&image_info->size,size);
513
505
      image_info->depth=reference_types[j].depth;
514
506
      (void) FormatMagickString(reference_image->filename,MaxTextExtent,"%s:%s",
618
610
      (void) fprintf(stdout,"... pass.\n");
619
611
    }
620
612
  }
621
 
  (void) fprintf(stdout,
622
 
    "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
623
 
    (double) (test-(*fail)),(double) *fail);
 
613
  (void) fprintf(stdout,"  summary: %lu subtests; %lu passed; %lu failed.\n",
 
614
    test,test-(*fail),*fail);
624
615
  return(test);
625
616
}
626
617
 
640
631
%
641
632
%  The format of the ValidateImageFormatsOnDisk method is:
642
633
%
643
 
%      size_t ValidateImageFormatsOnDisk(ImageInfo *image_info,
 
634
%      unsigned long ValidateImageFormatsOnDisk(ImageInfo *image_info,
644
635
%        const char *reference_filename,const char *output_filename,
645
 
%        size_t *fail,ExceptionInfo *exception)
 
636
%        unsigned long *fail,ExceptionInfo *exception)
646
637
%
647
638
%  A description of each parameter follows:
648
639
%
657
648
%    o exception: return any errors or warnings in this structure.
658
649
%
659
650
*/
660
 
static size_t ValidateImageFormatsOnDisk(ImageInfo *image_info,
 
651
static unsigned long ValidateImageFormatsOnDisk(ImageInfo *image_info,
661
652
  const char *reference_filename,const char *output_filename,
662
 
  size_t *fail,ExceptionInfo *exception)
 
653
  unsigned long *fail,ExceptionInfo *exception)
663
654
{
664
655
  char
665
656
    size[MaxTextExtent];
679
670
  MagickBooleanType
680
671
    status;
681
672
 
682
 
  register ssize_t
 
673
  register long
683
674
    i,
684
675
    j;
685
676
 
686
 
  size_t
 
677
  unsigned long
687
678
    test;
688
679
 
689
680
  test=0;
701
692
        Generate reference image.
702
693
      */
703
694
      CatchException(exception);
704
 
      (void) fprintf(stdout,"  test %.20g: %s/%s/%s/%.20g-bits",(double)
705
 
        (test++),reference_formats[i].magick,MagickOptionToMnemonic(
 
695
      (void) fprintf(stdout,"  test %lu: %s/%s/%s/%lu-bits",test++,
 
696
        reference_formats[i].magick,MagickOptionToMnemonic(
706
697
        MagickCompressOptions,reference_formats[i].compression),
707
698
        MagickOptionToMnemonic(MagickTypeOptions,reference_types[j].type),
708
 
        (double) reference_types[j].depth);
 
699
        reference_types[j].depth);
709
700
      (void) CopyMagickString(image_info->filename,reference_filename,
710
701
        MaxTextExtent);
711
702
      reference_image=ReadImage(image_info,exception);
718
709
      /*
719
710
        Write reference image.
720
711
      */
721
 
      (void) FormatMagickString(size,MaxTextExtent,"%.20gx%.20g",
722
 
        (double) reference_image->columns,(double) reference_image->rows);
 
712
      (void) FormatMagickString(size,MaxTextExtent,"%lux%lu",
 
713
        reference_image->columns,reference_image->rows);
723
714
      (void) CloneString(&image_info->size,size);
724
715
      image_info->depth=reference_types[j].depth;
725
716
      (void) FormatMagickString(reference_image->filename,MaxTextExtent,"%s:%s",
826
817
      (void) fprintf(stdout,"... pass.\n");
827
818
    }
828
819
  }
829
 
  (void) fprintf(stdout,
830
 
    "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
831
 
    (double) (test-(*fail)),(double) *fail);
 
820
  (void) fprintf(stdout,"  summary: %lu subtests; %lu passed; %lu failed.\n",
 
821
    test,test-(*fail),*fail);
832
822
  return(test);
833
823
}
834
824
 
848
838
%
849
839
%  The format of the ValidateImportExportPixels method is:
850
840
%
851
 
%      size_t ValidateImportExportPixels(ImageInfo *image_info,
 
841
%      unsigned long ValidateImportExportPixels(ImageInfo *image_info,
852
842
%        const char *reference_filename,const char *output_filename,
853
 
%        size_t *fail,ExceptionInfo *exception)
 
843
%        unsigned long *fail,ExceptionInfo *exception)
854
844
%
855
845
%  A description of each parameter follows:
856
846
%
865
855
%    o exception: return any errors or warnings in this structure.
866
856
%
867
857
*/
868
 
static size_t ValidateImportExportPixels(ImageInfo *image_info,
 
858
static unsigned long ValidateImportExportPixels(ImageInfo *image_info,
869
859
  const char *reference_filename,const char *output_filename,
870
 
  size_t *fail,ExceptionInfo *exception)
 
860
  unsigned long *fail,ExceptionInfo *exception)
871
861
{
872
862
  double
873
863
    distortion;
880
870
  MagickBooleanType
881
871
    status;
882
872
 
883
 
  register ssize_t
 
873
  register long
884
874
    i,
885
875
    j;
886
876
 
890
880
  unsigned char
891
881
    *pixels;
892
882
 
893
 
  size_t
 
883
  unsigned long
894
884
    test;
895
885
 
896
886
  (void) output_filename;
904
894
        Generate reference image.
905
895
      */
906
896
      CatchException(exception);
907
 
      (void) fprintf(stdout,"  test %.20g: %s/%s",(double) (test++),
 
897
      (void) fprintf(stdout,"  test %lu: %s/%s",test++,
908
898
        reference_map[i],MagickOptionToMnemonic(MagickStorageOptions,
909
899
        reference_storage[j].type));
910
900
      (void) CopyMagickString(image_info->filename,reference_filename,
997
987
      (void) fprintf(stdout,"... pass.\n");
998
988
    }
999
989
  }
1000
 
  (void) fprintf(stdout,
1001
 
    "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
1002
 
    (double) (test-(*fail)),(double) *fail);
 
990
  (void) fprintf(stdout,"  summary: %lu subtests; %lu passed; %lu failed.\n",
 
991
    test,test-(*fail),*fail);
1003
992
  return(test);
1004
993
}
1005
994
 
1019
1008
%
1020
1009
%  The format of the ValidateMontageCommand method is:
1021
1010
%
1022
 
%      size_t ValidateMontageCommand(ImageInfo *image_info,
 
1011
%      unsigned long ValidateMontageCommand(ImageInfo *image_info,
1023
1012
%        const char *reference_filename,const char *output_filename,
1024
 
%        size_t *fail,ExceptionInfo *exception)
 
1013
%        unsigned long *fail,ExceptionInfo *exception)
1025
1014
%
1026
1015
%  A description of each parameter follows:
1027
1016
%
1036
1025
%    o exception: return any errors or warnings in this structure.
1037
1026
%
1038
1027
*/
1039
 
static size_t ValidateMontageCommand(ImageInfo *image_info,
 
1028
static unsigned long ValidateMontageCommand(ImageInfo *image_info,
1040
1029
  const char *reference_filename,const char *output_filename,
1041
 
  size_t *fail,ExceptionInfo *exception)
 
1030
  unsigned long *fail,ExceptionInfo *exception)
1042
1031
{
1043
1032
  char
1044
1033
    **arguments,
1050
1039
  MagickBooleanType
1051
1040
    status;
1052
1041
 
1053
 
  register ssize_t
 
1042
  register long
1054
1043
    i,
1055
1044
    j;
1056
1045
 
1057
 
  size_t
 
1046
  unsigned long
1058
1047
    test;
1059
1048
 
1060
1049
  test=0;
1062
1051
  for (i=0; montage_options[i] != (char *) NULL; i++)
1063
1052
  {
1064
1053
    CatchException(exception);
1065
 
    (void) fprintf(stdout,"  test %.20g: %s",(double) (test++),
1066
 
      montage_options[i]);
 
1054
    (void) fprintf(stdout,"  test %lu: %s",test++,montage_options[i]);
1067
1055
    (void) FormatMagickString(command,MaxTextExtent,"%s %s %s %s",
1068
1056
      reference_filename,montage_options[i],reference_filename,
1069
1057
      output_filename);
1087
1075
      }
1088
1076
    (void) fprintf(stdout,"... pass.\n");
1089
1077
  }
1090
 
  (void) fprintf(stdout,
1091
 
    "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
1092
 
    (double) (test-(*fail)),(double) *fail);
 
1078
  (void) fprintf(stdout,"  summary: %lu subtests; %lu passed; %lu failed.\n",
 
1079
    test,test-(*fail),*fail);
1093
1080
  return(test);
1094
1081
}
1095
1082
 
1109
1096
%
1110
1097
%  The format of the ValidateStreamCommand method is:
1111
1098
%
1112
 
%      size_t ValidateStreamCommand(ImageInfo *image_info,
 
1099
%      unsigned long ValidateStreamCommand(ImageInfo *image_info,
1113
1100
%        const char *reference_filename,const char *output_filename,
1114
 
%        size_t *fail,ExceptionInfo *exception)
 
1101
%        unsigned long *fail,ExceptionInfo *exception)
1115
1102
%
1116
1103
%  A description of each parameter follows:
1117
1104
%
1126
1113
%    o exception: return any errors or warnings in this structure.
1127
1114
%
1128
1115
*/
1129
 
static size_t ValidateStreamCommand(ImageInfo *image_info,
 
1116
static unsigned long ValidateStreamCommand(ImageInfo *image_info,
1130
1117
  const char *reference_filename,const char *output_filename,
1131
 
  size_t *fail,ExceptionInfo *exception)
 
1118
  unsigned long *fail,ExceptionInfo *exception)
1132
1119
{
1133
1120
  char
1134
1121
    **arguments,
1140
1127
  MagickBooleanType
1141
1128
    status;
1142
1129
 
1143
 
  register ssize_t
 
1130
  register long
1144
1131
    i,
1145
1132
    j;
1146
1133
 
1147
 
  size_t
 
1134
  unsigned long
1148
1135
    test;
1149
1136
 
1150
1137
  test=0;
1152
1139
  for (i=0; stream_options[i] != (char *) NULL; i++)
1153
1140
  {
1154
1141
    CatchException(exception);
1155
 
    (void) fprintf(stdout,"  test %.20g: %s",(double) (test++),
1156
 
      stream_options[i]);
 
1142
    (void) fprintf(stdout,"  test %lu: %s",test++,stream_options[i]);
1157
1143
    (void) FormatMagickString(command,MaxTextExtent,"%s %s %s",
1158
1144
      stream_options[i],reference_filename,output_filename);
1159
1145
    arguments=StringToArgv(command,&number_arguments);
1176
1162
      }
1177
1163
    (void) fprintf(stdout,"... pass.\n");
1178
1164
  }
1179
 
  (void) fprintf(stdout,
1180
 
    "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
1181
 
    (double) (test-(*fail)),(double) *fail);
 
1165
  (void) fprintf(stdout,"  summary: %lu subtests; %lu passed; %lu failed.\n",
 
1166
    test,test-(*fail),*fail);
1182
1167
  return(test);
1183
1168
}
1184
1169
 
1218
1203
      (char *) NULL
1219
1204
    };
1220
1205
 
1221
 
  (void) printf("Version: %s\n",GetMagickVersion((size_t *) NULL));
 
1206
  (void) printf("Version: %s\n",GetMagickVersion((unsigned long *) NULL));
1222
1207
  (void) printf("Copyright: %s\n\n",GetMagickCopyright());
1223
1208
  (void) printf("Features: %s\n",GetMagickFeatures());
1224
1209
  (void) printf("Usage: %s [options ...] reference-file\n",GetClientName());
1269
1254
    regard_warnings,
1270
1255
    status;
1271
1256
 
1272
 
  register ssize_t
 
1257
  register long
1273
1258
    i;
1274
1259
 
1275
1260
  TimerInfo
1276
1261
    *timer;
1277
1262
 
1278
 
  size_t
 
1263
  unsigned long
1279
1264
    fail,
1280
1265
    iterations,
1281
1266
    tests;
1294
1279
  exception=AcquireExceptionInfo();
1295
1280
  image_info=AcquireImageInfo();
1296
1281
  (void) CopyMagickString(image_info->filename,ReferenceFilename,MaxTextExtent);
1297
 
  for (i=1; i < (ssize_t) argc; i++)
 
1282
  for (i=1; i < (long) argc; i++)
1298
1283
  {
1299
1284
    option=argv[i];
1300
1285
    if (IsMagickOption(option) == MagickFalse)
1354
1339
      {
1355
1340
        if (LocaleCompare("validate",option+1) == 0)
1356
1341
          {
1357
 
            ssize_t
 
1342
            long
1358
1343
              validate;
1359
1344
 
1360
1345
            if (*option == '+')
1361
1346
              break;
1362
1347
            i++;
1363
 
            if (i == (ssize_t) argc)
 
1348
            if (i == (long) argc)
1364
1349
              ThrowValidateException(OptionError,"MissingArgument",option);
1365
1350
            validate=ParseMagickOption(MagickValidateOptions,MagickFalse,
1366
1351
              argv[i]);
1374
1359
            (LocaleCompare("-version",option+1) == 0))
1375
1360
          {
1376
1361
            (void) fprintf(stdout,"Version: %s\n",
1377
 
              GetMagickVersion((size_t *) NULL));
 
1362
              GetMagickVersion((unsigned long *) NULL));
1378
1363
            (void) fprintf(stdout,"Copyright: %s\n\n",GetMagickCopyright());
1379
1364
            (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
1380
1365
            return(0);
1410
1395
      else
1411
1396
        {
1412
1397
          (void) fprintf(stdout,"Version: %s\n",
1413
 
            GetMagickVersion((size_t *) NULL));
 
1398
            GetMagickVersion((unsigned long *) NULL));
1414
1399
          (void) fprintf(stdout,"Copyright: %s\n\n",
1415
1400
            GetMagickCopyright());
1416
1401
          (void) fprintf(stdout,"ImageMagick Validation Suite (%s)\n\n",
1417
 
            MagickOptionToMnemonic(MagickValidateOptions,(ssize_t) type));
 
1402
            MagickOptionToMnemonic(MagickValidateOptions,(long) type));
1418
1403
          if ((type & CompareValidate) != 0)
1419
1404
            tests+=ValidateCompareCommand(image_info,reference_filename,
1420
1405
              output_filename,&fail,exception);
1442
1427
          if ((type & StreamValidate) != 0)
1443
1428
            tests+=ValidateStreamCommand(image_info,reference_filename,
1444
1429
              output_filename,&fail,exception);
1445
 
          (void) fprintf(stdout,
1446
 
            "validation suite: %.20g tests; %.20g passed; %.20g failed.\n",
1447
 
            (double) tests,(double) (tests-fail),(double) fail);
 
1430
          (void) fprintf(stdout,"validation suite: %lu tests; %lu passed; "
 
1431
            "%lu failed.\n",tests,tests-fail,fail);
1448
1432
        }
1449
1433
      (void) RelinquishUniqueFileResource(output_filename);
1450
1434
      (void) RelinquishUniqueFileResource(reference_filename);
1456
1440
      elapsed_time=GetElapsedTime(timer);
1457
1441
      user_time=GetUserTime(timer);
1458
1442
      (void) fprintf(stderr,
1459
 
        "Performance: %.20gi %gips %0.3fu %ld:%02ld.%03ld\n",(double)
 
1443
        "Performance: %lui %gips %0.3fu %ld:%02ld.%03ld\n",
1460
1444
        iterations,1.0*iterations/elapsed_time,user_time,(long)
1461
1445
        (elapsed_time/60.0),(long) ceil(fmod(elapsed_time,60.0)),
1462
1446
        (long) (1000.0*(elapsed_time-floor(elapsed_time))));