Commit f072be032fe921617ba5f78a004ee73c75caf6bd

Authored by Jay Berkenbilt
1 parent 3f9d50b5

qpdf-ctest: outfile2 -> xarg

Showing 1 changed file with 37 additions and 37 deletions
qpdf/qpdf-ctest.c
... ... @@ -136,7 +136,7 @@ static void count_progress(int percent, void* data)
136 136 static void test01(char const* infile,
137 137 char const* password,
138 138 char const* outfile,
139   - char const* outfile2)
  139 + char const* xarg)
140 140 {
141 141 qpdf_read(qpdf, infile, password);
142 142 printf("version: %s\n", qpdf_get_pdf_version(qpdf));
... ... @@ -174,7 +174,7 @@ static void test01(char const* infile,
174 174 static void test02(char const* infile,
175 175 char const* password,
176 176 char const* outfile,
177   - char const* outfile2)
  177 + char const* xarg)
178 178 {
179 179 qpdf_set_suppress_warnings(qpdf, QPDF_TRUE);
180 180 if (((qpdf_read(qpdf, infile, password) & QPDF_ERRORS) == 0) &&
... ... @@ -189,7 +189,7 @@ static void test02(char const* infile,
189 189 static void test03(char const* infile,
190 190 char const* password,
191 191 char const* outfile,
192   - char const* outfile2)
  192 + char const* xarg)
193 193 {
194 194 qpdf_read(qpdf, infile, password);
195 195 qpdf_init_write(qpdf, outfile);
... ... @@ -202,7 +202,7 @@ static void test03(char const* infile,
202 202 static void test04(char const* infile,
203 203 char const* password,
204 204 char const* outfile,
205   - char const* outfile2)
  205 + char const* xarg)
206 206 {
207 207 qpdf_set_ignore_xref_streams(qpdf, QPDF_TRUE);
208 208 qpdf_read(qpdf, infile, password);
... ... @@ -215,7 +215,7 @@ static void test04(char const* infile,
215 215 static void test05(char const* infile,
216 216 char const* password,
217 217 char const* outfile,
218   - char const* outfile2)
  218 + char const* xarg)
219 219 {
220 220 int count = 0;
221 221 qpdf_read(qpdf, infile, password);
... ... @@ -232,7 +232,7 @@ static void test05(char const* infile,
232 232 static void test06(char const* infile,
233 233 char const* password,
234 234 char const* outfile,
235   - char const* outfile2)
  235 + char const* xarg)
236 236 {
237 237 char* buf = NULL;
238 238 unsigned long size = 0;
... ... @@ -249,7 +249,7 @@ static void test06(char const* infile,
249 249 static void test07(char const* infile,
250 250 char const* password,
251 251 char const* outfile,
252   - char const* outfile2)
  252 + char const* xarg)
253 253 {
254 254 qpdf_read(qpdf, infile, password);
255 255 qpdf_init_write(qpdf, outfile);
... ... @@ -262,7 +262,7 @@ static void test07(char const* infile,
262 262 static void test08(char const* infile,
263 263 char const* password,
264 264 char const* outfile,
265   - char const* outfile2)
  265 + char const* xarg)
266 266 {
267 267 qpdf_read(qpdf, infile, password);
268 268 qpdf_init_write(qpdf, outfile);
... ... @@ -276,7 +276,7 @@ static void test08(char const* infile,
276 276 static void test09(char const* infile,
277 277 char const* password,
278 278 char const* outfile,
279   - char const* outfile2)
  279 + char const* xarg)
280 280 {
281 281 qpdf_read(qpdf, infile, password);
282 282 qpdf_init_write(qpdf, outfile);
... ... @@ -289,7 +289,7 @@ static void test09(char const* infile,
289 289 static void test10(char const* infile,
290 290 char const* password,
291 291 char const* outfile,
292   - char const* outfile2)
  292 + char const* xarg)
293 293 {
294 294 qpdf_set_attempt_recovery(qpdf, QPDF_FALSE);
295 295 qpdf_read(qpdf, infile, password);
... ... @@ -299,7 +299,7 @@ static void test10(char const* infile,
299 299 static void test11(char const* infile,
300 300 char const* password,
301 301 char const* outfile,
302   - char const* outfile2)
  302 + char const* xarg)
303 303 {
304 304 qpdf_read(qpdf, infile, password);
305 305 qpdf_init_write(qpdf, outfile);
... ... @@ -313,7 +313,7 @@ static void test11(char const* infile,
313 313 static void test12(char const* infile,
314 314 char const* password,
315 315 char const* outfile,
316   - char const* outfile2)
  316 + char const* xarg)
317 317 {
318 318 qpdf_read(qpdf, infile, password);
319 319 qpdf_init_write(qpdf, outfile);
... ... @@ -329,7 +329,7 @@ static void test12(char const* infile,
329 329 static void test13(char const* infile,
330 330 char const* password,
331 331 char const* outfile,
332   - char const* outfile2)
  332 + char const* xarg)
333 333 {
334 334 qpdf_read(qpdf, infile, password);
335 335 printf("user password: %s\n", qpdf_get_user_password(qpdf));
... ... @@ -343,14 +343,14 @@ static void test13(char const* infile,
343 343 static void test14(char const* infile,
344 344 char const* password,
345 345 char const* outfile,
346   - char const* outfile2)
  346 + char const* xarg)
347 347 {
348 348 qpdf_read(qpdf, infile, password);
349 349 qpdf_init_write(qpdf, outfile);
350 350 qpdf_set_static_ID(qpdf, QPDF_TRUE);
351 351 qpdf_set_minimum_pdf_version_and_extension(qpdf, "1.7", 8);
352 352 qpdf_write(qpdf);
353   - qpdf_init_write(qpdf, outfile2);
  353 + qpdf_init_write(qpdf, xarg);
354 354 qpdf_set_static_ID(qpdf, QPDF_TRUE);
355 355 qpdf_force_pdf_version(qpdf, "1.4");
356 356 qpdf_write(qpdf);
... ... @@ -360,7 +360,7 @@ static void test14(char const* infile,
360 360 static void test15(char const* infile,
361 361 char const* password,
362 362 char const* outfile,
363   - char const* outfile2)
  363 + char const* xarg)
364 364 {
365 365 qpdf_read(qpdf, infile, password);
366 366 qpdf_init_write(qpdf, outfile);
... ... @@ -384,7 +384,7 @@ static void print_info(char const* key)
384 384 static void test16(char const* infile,
385 385 char const* password,
386 386 char const* outfile,
387   - char const* outfile2)
  387 + char const* xarg)
388 388 {
389 389 unsigned long buflen = 0L;
390 390 unsigned char const* buf = 0;
... ... @@ -416,7 +416,7 @@ static void test16(char const* infile,
416 416 static void test17(char const* infile,
417 417 char const* password,
418 418 char const* outfile,
419   - char const* outfile2)
  419 + char const* xarg)
420 420 {
421 421 qpdf_read(qpdf, infile, password);
422 422 qpdf_init_write(qpdf, outfile);
... ... @@ -433,7 +433,7 @@ static void test17(char const* infile,
433 433 static void test18(char const* infile,
434 434 char const* password,
435 435 char const* outfile,
436   - char const* outfile2)
  436 + char const* xarg)
437 437 {
438 438 qpdf_read(qpdf, infile, password);
439 439 qpdf_init_write(qpdf, outfile);
... ... @@ -450,7 +450,7 @@ static void test18(char const* infile,
450 450 static void test19(char const* infile,
451 451 char const* password,
452 452 char const* outfile,
453   - char const* outfile2)
  453 + char const* xarg)
454 454 {
455 455 qpdf_read(qpdf, infile, password);
456 456 qpdf_init_write(qpdf, outfile);
... ... @@ -462,7 +462,7 @@ static void test19(char const* infile,
462 462 static void test20(char const* infile,
463 463 char const* password,
464 464 char const* outfile,
465   - char const* outfile2)
  465 + char const* xarg)
466 466 {
467 467 qpdf_read(qpdf, infile, password);
468 468 qpdf_init_write(qpdf, outfile);
... ... @@ -477,7 +477,7 @@ static void test20(char const* infile,
477 477 static void test21(char const* infile,
478 478 char const* password,
479 479 char const* outfile,
480   - char const* outfile2)
  480 + char const* xarg)
481 481 {
482 482 qpdf_read(qpdf, infile, password);
483 483 qpdf_init_write(qpdf, outfile);
... ... @@ -491,7 +491,7 @@ static void test21(char const* infile,
491 491 static void test22(char const* infile,
492 492 char const* password,
493 493 char const* outfile,
494   - char const* outfile2)
  494 + char const* xarg)
495 495 {
496 496 qpdf_read(qpdf, infile, password);
497 497 qpdf_init_write(qpdf, outfile);
... ... @@ -506,7 +506,7 @@ static void test22(char const* infile,
506 506 static void test23(char const* infile,
507 507 char const* password,
508 508 char const* outfile,
509   - char const* outfile2)
  509 + char const* xarg)
510 510 {
511 511 QPDF_ERROR_CODE status = 0;
512 512 qpdf_read(qpdf, infile, password);
... ... @@ -518,7 +518,7 @@ static void test23(char const* infile,
518 518 static void test24(char const* infile,
519 519 char const* password,
520 520 char const* outfile,
521   - char const* outfile2)
  521 + char const* xarg)
522 522 {
523 523 /* This test case is designed for minimal.pdf. Pull objects out of
524 524 * minimal.pdf to make sure all our accessors work as expected.
... ... @@ -655,7 +655,7 @@ static void test24(char const* infile,
655 655 static void test25(char const* infile,
656 656 char const* password,
657 657 char const* outfile,
658   - char const* outfile2)
  658 + char const* xarg)
659 659 {
660 660 /* This test case is designed for minimal.pdf. */
661 661 qpdf_read(qpdf, infile, password);
... ... @@ -737,7 +737,7 @@ static void test25(char const* infile,
737 737 static void test26(char const* infile,
738 738 char const* password,
739 739 char const* outfile,
740   - char const* outfile2)
  740 + char const* xarg)
741 741 {
742 742 /* Make sure we detect uninitialized objects */
743 743 qpdf_data qpdf2 = qpdf_init();
... ... @@ -749,7 +749,7 @@ static void test26(char const* infile,
749 749 static void test27(char const* infile,
750 750 char const* password,
751 751 char const* outfile,
752   - char const* outfile2)
  752 + char const* xarg)
753 753 {
754 754 /* Exercise a string with a null. Since the regular methods return
755 755 * char*, we can't see past the null character without looking
... ... @@ -767,7 +767,7 @@ static void test27(char const* infile,
767 767 static void test28(char const* infile,
768 768 char const* password,
769 769 char const* outfile,
770   - char const* outfile2)
  770 + char const* xarg)
771 771 {
772 772 /* This test case is designed for minimal.pdf. */
773 773  
... ... @@ -808,7 +808,7 @@ static void test28(char const* infile,
808 808 static void test29(char const* infile,
809 809 char const* password,
810 810 char const* outfile,
811   - char const* outfile2)
  811 + char const* xarg)
812 812 {
813 813 /* Trap exceptions thrown by object accessors. Type mismatches are
814 814 * errors rather than warnings when they don't have an owning QPDF
... ... @@ -857,7 +857,7 @@ static void test29(char const* infile,
857 857 static void test30(char const* infile,
858 858 char const* password,
859 859 char const* outfile,
860   - char const* outfile2)
  860 + char const* xarg)
861 861 {
862 862 assert(qpdf_read(qpdf, infile, password) & QPDF_ERRORS);
863 863 /* Fail to handle error */
... ... @@ -866,7 +866,7 @@ static void test30(char const* infile,
866 866 static void test31(char const* infile,
867 867 char const* password,
868 868 char const* outfile,
869   - char const* outfile2)
  869 + char const* xarg)
870 870 {
871 871 /* Make sure type warnings have a specific error code. This test
872 872 * case is designed for minimal.pdf.
... ... @@ -884,7 +884,7 @@ static void test31(char const* infile,
884 884 static void test32(char const* infile,
885 885 char const* password,
886 886 char const* outfile,
887   - char const* outfile2)
  887 + char const* xarg)
888 888 {
889 889 /* This test case is designed for minimal.pdf. */
890 890 assert(qpdf_read(qpdf, infile, password) == 0);
... ... @@ -897,7 +897,7 @@ static void test32(char const* infile,
897 897 static void test33(char const* infile,
898 898 char const* password,
899 899 char const* outfile,
900   - char const* outfile2)
  900 + char const* xarg)
901 901 {
902 902 /* This test case is designed for minimal.pdf. */
903 903  
... ... @@ -938,7 +938,7 @@ int main(int argc, char* argv[])
938 938 char const* infile = 0;
939 939 char const* password = 0;
940 940 char const* outfile = 0;
941   - char const* outfile2 = 0;
  941 + char const* xarg = 0;
942 942 void (*fn)(char const*, char const*, char const*, char const*) = 0;
943 943  
944 944 if ((p = strrchr(argv[0], '/')) != NULL)
... ... @@ -969,7 +969,7 @@ int main(int argc, char* argv[])
969 969 infile = argv[2];
970 970 password = argv[3];
971 971 outfile = argv[4];
972   - outfile2 = (argc > 5 ? argv[5] : 0);
  972 + xarg = (argc > 5 ? argv[5] : 0);
973 973  
974 974 fn = ((n == 1) ? test01 :
975 975 (n == 2) ? test02 :
... ... @@ -1013,7 +1013,7 @@ int main(int argc, char* argv[])
1013 1013 }
1014 1014  
1015 1015 qpdf = qpdf_init();
1016   - fn(infile, password, outfile, outfile2);
  1016 + fn(infile, password, outfile, xarg);
1017 1017 qpdf_cleanup(&qpdf);
1018 1018 assert(qpdf == 0);
1019 1019  
... ...