Skip to content

Commit 74aed4c

Browse files
committed
Update Xcode project.
1 parent d2d060c commit 74aed4c

11 files changed

Lines changed: 117 additions & 109 deletions

File tree

tools/ippfind.c

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,13 @@ main(int argc, // I - Number of command-line args
223223
if (logic == IPPFIND_OP_OR)
224224
{
225225
cupsLangPrintf(stderr, _("%s: Cannot use '--and' after '--or'."), "ippfind");
226-
return (usage(stderr));
226+
exit(usage(stderr));
227227
}
228228

229229
if (!current)
230230
{
231231
cupsLangPrintf(stderr, _("%s: Missing expression before '--and'."), "ippfind");
232-
return (usage(stderr));
232+
exit(usage(stderr));
233233
}
234234

235235
temp = NULL;
@@ -240,7 +240,7 @@ main(int argc, // I - Number of command-line args
240240
if (i >= argc)
241241
{
242242
cupsLangPrintf(stderr, _("%s: Missing regular expression after '%s'."), "ippfind", "--domain");
243-
return (usage(stderr));
243+
exit(usage(stderr));
244244
}
245245

246246
temp = new_expr(IPPFIND_OP_DOMAIN_REGEX, invert, NULL, argv[i], NULL);
@@ -251,7 +251,7 @@ main(int argc, // I - Number of command-line args
251251
if (i >= argc)
252252
{
253253
cupsLangPrintf(stderr, _("%s: Missing program after '%s'."), "ippfind", "--exec");
254-
return (usage(stderr));
254+
exit(usage(stderr));
255255
}
256256

257257
temp = new_expr(IPPFIND_OP_EXEC, invert, NULL, NULL, argv + i);
@@ -267,7 +267,7 @@ main(int argc, // I - Number of command-line args
267267
if (i >= argc)
268268
{
269269
cupsLangPrintf(stderr, _("%s: Missing semi-colon after '%s'."), "ippfind", "--exec");
270-
return (usage(stderr));
270+
exit(usage(stderr));
271271
}
272272

273273
have_output = true;
@@ -278,15 +278,15 @@ main(int argc, // I - Number of command-line args
278278
}
279279
else if (!strcmp(argv[i], "--help"))
280280
{
281-
return (usage(stdout));
281+
exit(usage(stdout));
282282
}
283283
else if (!strcmp(argv[i], "--host"))
284284
{
285285
i ++;
286286
if (i >= argc)
287287
{
288288
cupsLangPrintf(stderr, _("%s: Missing regular expression after '%s'."), "ippfind", "--host");
289-
return (usage(stderr));
289+
exit(usage(stderr));
290290
}
291291

292292
temp = new_expr(IPPFIND_OP_HOST_REGEX, invert, NULL, argv[i], NULL);
@@ -306,7 +306,7 @@ main(int argc, // I - Number of command-line args
306306
if (i >= argc)
307307
{
308308
cupsLangPrintf(stderr, _("%s: Missing name after '%s'."), "ippfind", "--literal-name");
309-
return (usage(stderr));
309+
exit(usage(stderr));
310310
}
311311

312312
temp = new_expr(IPPFIND_OP_NAME_LITERAL, invert, argv[i], NULL, NULL);
@@ -317,7 +317,7 @@ main(int argc, // I - Number of command-line args
317317
if (i >= argc)
318318
{
319319
cupsLangPrintf(stderr, _("%s: Missing regular expression after '%s'."), "ippfind", "--name");
320-
return (usage(stderr));
320+
exit(usage(stderr));
321321
}
322322

323323
temp = new_expr(IPPFIND_OP_NAME_REGEX, invert, NULL, argv[i], NULL);
@@ -331,7 +331,7 @@ main(int argc, // I - Number of command-line args
331331
if (!current)
332332
{
333333
cupsLangPrintf(stderr, _("%s: Missing expression before '--or'."), "ippfind");
334-
return (usage(stderr));
334+
exit(usage(stderr));
335335
}
336336

337337
logic = IPPFIND_OP_OR;
@@ -397,7 +397,7 @@ main(int argc, // I - Number of command-line args
397397
if (i >= argc)
398398
{
399399
cupsLangPrintf(stderr, _("%s: Missing regular expression after '%s'."), "ippfind", "--path");
400-
return (usage(stderr));
400+
exit(usage(stderr));
401401
}
402402

403403
temp = new_expr(IPPFIND_OP_PATH_REGEX, invert, NULL, argv[i], NULL);
@@ -408,7 +408,7 @@ main(int argc, // I - Number of command-line args
408408
if (i >= argc)
409409
{
410410
cupsLangPrintf(stderr, _("%s: Missing port range after '%s'."), "ippfind", "--port");
411-
return (usage(stderr));
411+
exit(usage(stderr));
412412
}
413413

414414
temp = new_expr(IPPFIND_OP_PORT_RANGE, invert, argv[i], NULL, NULL);
@@ -442,7 +442,7 @@ main(int argc, // I - Number of command-line args
442442
if (i >= argc)
443443
{
444444
cupsLangPrintf(stderr, _("%s: Missing key name after '%s'."), "ippfind", "--txt");
445-
return (usage(stderr));
445+
exit(usage(stderr));
446446
}
447447

448448
temp = new_expr(IPPFIND_OP_TXT_EXISTS, invert, argv[i], NULL, NULL);
@@ -455,7 +455,7 @@ main(int argc, // I - Number of command-line args
455455
if (i >= argc)
456456
{
457457
cupsLangPrintf(stderr, _("%s: Missing regular expression after '%s'."), "ippfind", argv[i - 1]);
458-
return (usage(stderr));
458+
exit(usage(stderr));
459459
}
460460

461461
temp = new_expr(IPPFIND_OP_TXT_REGEX, invert, key, argv[i], NULL);
@@ -466,20 +466,20 @@ main(int argc, // I - Number of command-line args
466466
if (i >= argc)
467467
{
468468
cupsLangPrintf(stderr, _("%s: Missing regular expression after '%s'."), "ippfind", "--uri");
469-
return (usage(stderr));
469+
exit(usage(stderr));
470470
}
471471

472472
temp = new_expr(IPPFIND_OP_URI_REGEX, invert, NULL, argv[i], NULL);
473473
}
474474
else if (!strcmp(argv[i], "--version"))
475475
{
476476
puts(LIBCUPS_VERSION);
477-
return (0);
477+
exit(0);
478478
}
479479
else
480480
{
481481
cupsLangPrintf(stderr, _("%s: Unknown option '%s'."), "ippfind", argv[i]);
482-
return (usage(stderr));
482+
exit(usage(stderr));
483483
}
484484

485485
if (temp)
@@ -541,7 +541,7 @@ main(int argc, // I - Number of command-line args
541541
if (i >= argc)
542542
{
543543
cupsLangPrintf(stderr, _("%s: Missing name after '%s'."), "ippfind", "-N");
544-
return (usage(stderr));
544+
exit(usage(stderr));
545545
}
546546

547547
temp = new_expr(IPPFIND_OP_NAME_LITERAL, invert, argv[i], NULL, NULL);
@@ -552,7 +552,7 @@ main(int argc, // I - Number of command-line args
552552
if (i >= argc)
553553
{
554554
cupsLangPrintf(stderr, _("%s: Missing port range after '%s'."), "ippfind", "-P");
555-
return (usage(stderr));
555+
exit(usage(stderr));
556556
}
557557

558558
temp = new_expr(IPPFIND_OP_PORT_RANGE, invert, argv[i], NULL, NULL);
@@ -563,7 +563,7 @@ main(int argc, // I - Number of command-line args
563563
if (i >= argc)
564564
{
565565
cupsLangPrintf(stderr, _("%s: Missing timeout after '-T'."), "ippfind");
566-
return (usage(stderr));
566+
exit(usage(stderr));
567567
}
568568

569569
bonjour_timeout = atof(argv[i]);
@@ -574,7 +574,7 @@ main(int argc, // I - Number of command-line args
574574
if (i >= argc)
575575
{
576576
cupsLangPrintf(stderr, _("%s: Missing version after '-V'."), "ippfind");
577-
return (usage(stderr));
577+
exit(usage(stderr));
578578
}
579579

580580
if (!strcmp(argv[i], "1.1"))
@@ -596,7 +596,7 @@ main(int argc, // I - Number of command-line args
596596
else
597597
{
598598
cupsLangPrintf(stderr, _("%s: Unsupported version \"%s\"."), "ippfind", argv[i]);
599-
return (usage(stderr));
599+
exit(usage(stderr));
600600
}
601601
break;
602602

@@ -605,7 +605,7 @@ main(int argc, // I - Number of command-line args
605605
if (i >= argc)
606606
{
607607
cupsLangPrintf(stderr, _("%s: Missing regular expression after '%s'."), "ippfind", "-d");
608-
return (usage(stderr));
608+
exit(usage(stderr));
609609
}
610610

611611
temp = new_expr(IPPFIND_OP_DOMAIN_REGEX, invert, NULL, argv[i], NULL);
@@ -616,7 +616,7 @@ main(int argc, // I - Number of command-line args
616616
if (i >= argc)
617617
{
618618
cupsLangPrintf(stderr, _("%s: Missing regular expression after '%s'."), "ippfind", "-h");
619-
return (usage(stderr));
619+
exit(usage(stderr));
620620
}
621621

622622
temp = new_expr(IPPFIND_OP_HOST_REGEX, invert, NULL, argv[i], NULL);
@@ -632,7 +632,7 @@ main(int argc, // I - Number of command-line args
632632
if (i >= argc)
633633
{
634634
cupsLangPrintf(stderr, _("%s: Missing regular expression after '%s'."), "ippfind", "-n");
635-
return (usage(stderr));
635+
exit(usage(stderr));
636636
}
637637

638638
temp = new_expr(IPPFIND_OP_NAME_REGEX, invert, NULL, argv[i], NULL);
@@ -663,7 +663,7 @@ main(int argc, // I - Number of command-line args
663663
if (i >= argc)
664664
{
665665
cupsLangPrintf(stderr, _("%s: Missing key name after '%s'."), "ippfind", "-t");
666-
return (usage(stderr));
666+
exit(usage(stderr));
667667
}
668668

669669
temp = new_expr(IPPFIND_OP_TXT_EXISTS, invert, argv[i], NULL, NULL);
@@ -674,7 +674,7 @@ main(int argc, // I - Number of command-line args
674674
if (i >= argc)
675675
{
676676
cupsLangPrintf(stderr, _("%s: Missing regular expression after '%s'."), "ippfind", "-u");
677-
return (usage(stderr));
677+
exit(usage(stderr));
678678
}
679679

680680
temp = new_expr(IPPFIND_OP_URI_REGEX, invert, NULL, argv[i], NULL);
@@ -685,7 +685,7 @@ main(int argc, // I - Number of command-line args
685685
if (i >= argc)
686686
{
687687
cupsLangPrintf(stderr, _("%s: Missing program after '%s'."), "ippfind", "-x");
688-
return (usage(stderr));
688+
exit(usage(stderr));
689689
}
690690

691691
temp = new_expr(IPPFIND_OP_EXEC, invert, NULL, NULL, argv + i);
@@ -701,15 +701,15 @@ main(int argc, // I - Number of command-line args
701701
if (i >= argc)
702702
{
703703
cupsLangPrintf(stderr, _("%s: Missing semi-colon after '%s'."), "ippfind", "-x");
704-
return (usage(stderr));
704+
exit(usage(stderr));
705705
}
706706

707707
have_output = true;
708708
break;
709709

710710
default :
711711
cupsLangPrintf(stderr, _("%s: Unknown option '-%c'."), "ippfind", *opt);
712-
return (usage(stderr));
712+
exit(usage(stderr));
713713
}
714714

715715
if (temp)
@@ -758,7 +758,7 @@ main(int argc, // I - Number of command-line args
758758
if (num_parens >= 100)
759759
{
760760
cupsLangPrintf(stderr, _("%s: Too many parenthesis."), "ippfind");
761-
return (usage(stderr));
761+
exit(usage(stderr));
762762
}
763763

764764
temp = new_expr(IPPFIND_OP_AND, invert, NULL, NULL, NULL);
@@ -786,7 +786,7 @@ main(int argc, // I - Number of command-line args
786786
if (num_parens <= 0)
787787
{
788788
cupsLangPrintf(stderr, _("%s: Missing open parenthesis."), "ippfind");
789-
return (usage(stderr));
789+
exit(usage(stderr));
790790
}
791791

792792
current = parens[--num_parens];
@@ -812,7 +812,7 @@ main(int argc, // I - Number of command-line args
812812
if (num_parens > 0)
813813
{
814814
cupsLangPrintf(stderr, _("%s: Missing close parenthesis."), "ippfind");
815-
return (usage(stderr));
815+
exit(usage(stderr));
816816
}
817817

818818
if (!have_output)

0 commit comments

Comments
 (0)