490
487
int option_index;
492
489
for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
495
492
/* Test all long options for either exact match
496
or abbreviated matches. */
493
or abbreviated matches. */
497
494
for (p = longopts, option_index = 0; p->name; p++, option_index++)
498
if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
500
if ((unsigned int) (nameend - d->__nextchar)
501
== (unsigned int) strlen (p->name))
503
/* Exact match found. */
505
indfound = option_index;
509
else if (pfound == NULL)
511
/* First nonexact match found. */
513
indfound = option_index;
516
|| pfound->has_arg != p->has_arg
517
|| pfound->flag != p->flag
518
|| pfound->val != p->val)
519
/* Second or later nonexact match found. */
495
if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
497
if ((unsigned int) (nameend - d->__nextchar)
498
== (unsigned int) strlen (p->name))
500
/* Exact match found. */
502
indfound = option_index;
506
else if (pfound == NULL)
508
/* First nonexact match found. */
510
indfound = option_index;
513
|| pfound->has_arg != p->has_arg
514
|| pfound->flag != p->flag
515
|| pfound->val != p->val)
516
/* Second or later nonexact match found. */
523
520
if (ambig && !exact)
527
524
#if defined _LIBC && defined USE_IN_LIBIO
530
if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
531
argv[0], argv[d->optind]) >= 0)
533
_IO_flockfile (stderr);
535
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
536
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
538
__fxprintf (NULL, "%s", buf);
540
((_IO_FILE *) stderr)->_flags2 = old_flags2;
541
_IO_funlockfile (stderr);
527
if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"),
528
argv[0], argv[d->optind]) >= 0)
530
_IO_flockfile (stderr);
532
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
533
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
535
__fxprintf (NULL, "%s", buf);
537
((_IO_FILE *) stderr)->_flags2 = old_flags2;
538
_IO_funlockfile (stderr);
546
fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
547
argv[0], argv[d->optind]);
543
fprintf (stderr, _("%s: option '%s' is ambiguous\n"),
544
argv[0], argv[d->optind]);
550
d->__nextchar += strlen (d->__nextchar);
547
d->__nextchar += strlen (d->__nextchar);
556
553
if (pfound != NULL)
558
option_index = indfound;
562
/* Don't test has_arg with >, because some C compilers don't
563
allow it to be used on enums. */
565
d->optarg = nameend + 1;
570
#if defined _LIBC && defined USE_IN_LIBIO
575
if (argv[d->optind - 1][1] == '-')
578
#if defined _LIBC && defined USE_IN_LIBIO
579
n = __asprintf (&buf, _("\
580
%s: option `--%s' doesn't allow an argument\n"),
581
argv[0], pfound->name);
583
fprintf (stderr, _("\
584
%s: option `--%s' doesn't allow an argument\n"),
585
argv[0], pfound->name);
590
/* +option or -option */
591
#if defined _LIBC && defined USE_IN_LIBIO
592
n = __asprintf (&buf, _("\
593
%s: option `%c%s' doesn't allow an argument\n"),
594
argv[0], argv[d->optind - 1][0],
597
fprintf (stderr, _("\
598
%s: option `%c%s' doesn't allow an argument\n"),
599
argv[0], argv[d->optind - 1][0],
604
#if defined _LIBC && defined USE_IN_LIBIO
607
_IO_flockfile (stderr);
609
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
610
((_IO_FILE *) stderr)->_flags2
611
|= _IO_FLAGS2_NOTCANCEL;
613
__fxprintf (NULL, "%s", buf);
615
((_IO_FILE *) stderr)->_flags2 = old_flags2;
616
_IO_funlockfile (stderr);
623
d->__nextchar += strlen (d->__nextchar);
625
d->optopt = pfound->val;
629
else if (pfound->has_arg == 1)
631
if (d->optind < argc)
632
d->optarg = argv[d->optind++];
637
#if defined _LIBC && defined USE_IN_LIBIO
640
if (__asprintf (&buf, _("\
641
%s: option `%s' requires an argument\n"),
642
argv[0], argv[d->optind - 1]) >= 0)
644
_IO_flockfile (stderr);
646
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
647
((_IO_FILE *) stderr)->_flags2
648
|= _IO_FLAGS2_NOTCANCEL;
650
__fxprintf (NULL, "%s", buf);
652
((_IO_FILE *) stderr)->_flags2 = old_flags2;
653
_IO_funlockfile (stderr);
659
_("%s: option `%s' requires an argument\n"),
660
argv[0], argv[d->optind - 1]);
663
d->__nextchar += strlen (d->__nextchar);
664
d->optopt = pfound->val;
665
return optstring[0] == ':' ? ':' : '?';
668
d->__nextchar += strlen (d->__nextchar);
670
*longind = option_index;
673
*(pfound->flag) = pfound->val;
555
option_index = indfound;
559
/* Don't test has_arg with >, because some C compilers don't
560
allow it to be used on enums. */
562
d->optarg = nameend + 1;
567
#if defined _LIBC && defined USE_IN_LIBIO
572
if (argv[d->optind - 1][1] == '-')
575
#if defined _LIBC && defined USE_IN_LIBIO
576
n = __asprintf (&buf, _("\
577
%s: option '--%s' doesn't allow an argument\n"),
578
argv[0], pfound->name);
580
fprintf (stderr, _("\
581
%s: option '--%s' doesn't allow an argument\n"),
582
argv[0], pfound->name);
587
/* +option or -option */
588
#if defined _LIBC && defined USE_IN_LIBIO
589
n = __asprintf (&buf, _("\
590
%s: option '%c%s' doesn't allow an argument\n"),
591
argv[0], argv[d->optind - 1][0],
594
fprintf (stderr, _("\
595
%s: option '%c%s' doesn't allow an argument\n"),
596
argv[0], argv[d->optind - 1][0],
601
#if defined _LIBC && defined USE_IN_LIBIO
604
_IO_flockfile (stderr);
606
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
607
((_IO_FILE *) stderr)->_flags2
608
|= _IO_FLAGS2_NOTCANCEL;
610
__fxprintf (NULL, "%s", buf);
612
((_IO_FILE *) stderr)->_flags2 = old_flags2;
613
_IO_funlockfile (stderr);
620
d->__nextchar += strlen (d->__nextchar);
622
d->optopt = pfound->val;
626
else if (pfound->has_arg == 1)
628
if (d->optind < argc)
629
d->optarg = argv[d->optind++];
634
#if defined _LIBC && defined USE_IN_LIBIO
637
if (__asprintf (&buf, _("\
638
%s: option '--%s' requires an argument\n"),
639
argv[0], pfound->name) >= 0)
641
_IO_flockfile (stderr);
643
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
644
((_IO_FILE *) stderr)->_flags2
645
|= _IO_FLAGS2_NOTCANCEL;
647
__fxprintf (NULL, "%s", buf);
649
((_IO_FILE *) stderr)->_flags2 = old_flags2;
650
_IO_funlockfile (stderr);
656
_("%s: option '--%s' requires an argument\n"),
657
argv[0], pfound->name);
660
d->__nextchar += strlen (d->__nextchar);
661
d->optopt = pfound->val;
662
return optstring[0] == ':' ? ':' : '?';
665
d->__nextchar += strlen (d->__nextchar);
667
*longind = option_index;
670
*(pfound->flag) = pfound->val;
679
676
/* Can't find it as a long option. If this is not getopt_long_only,
680
or the option starts with '--' or is not a valid short
681
option, then it's an error.
682
Otherwise interpret it as a short option. */
677
or the option starts with '--' or is not a valid short
678
option, then it's an error.
679
Otherwise interpret it as a short option. */
683
680
if (!long_only || argv[d->optind][1] == '-'
684
|| strchr (optstring, *d->__nextchar) == NULL)
688
#if defined _LIBC && defined USE_IN_LIBIO
693
if (argv[d->optind][1] == '-')
696
#if defined _LIBC && defined USE_IN_LIBIO
697
n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
698
argv[0], d->__nextchar);
700
fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
701
argv[0], d->__nextchar);
706
/* +option or -option */
707
#if defined _LIBC && defined USE_IN_LIBIO
708
n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"),
709
argv[0], argv[d->optind][0], d->__nextchar);
711
fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
712
argv[0], argv[d->optind][0], d->__nextchar);
716
#if defined _LIBC && defined USE_IN_LIBIO
719
_IO_flockfile (stderr);
721
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
722
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
724
__fxprintf (NULL, "%s", buf);
726
((_IO_FILE *) stderr)->_flags2 = old_flags2;
727
_IO_funlockfile (stderr);
733
d->__nextchar = (char *) "";
681
|| strchr (optstring, *d->__nextchar) == NULL)
685
#if defined _LIBC && defined USE_IN_LIBIO
690
if (argv[d->optind][1] == '-')
693
#if defined _LIBC && defined USE_IN_LIBIO
694
n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"),
695
argv[0], d->__nextchar);
697
fprintf (stderr, _("%s: unrecognized option '--%s'\n"),
698
argv[0], d->__nextchar);
703
/* +option or -option */
704
#if defined _LIBC && defined USE_IN_LIBIO
705
n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"),
706
argv[0], argv[d->optind][0], d->__nextchar);
708
fprintf (stderr, _("%s: unrecognized option '%c%s'\n"),
709
argv[0], argv[d->optind][0], d->__nextchar);
713
#if defined _LIBC && defined USE_IN_LIBIO
716
_IO_flockfile (stderr);
718
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
719
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
721
__fxprintf (NULL, "%s", buf);
723
((_IO_FILE *) stderr)->_flags2 = old_flags2;
724
_IO_funlockfile (stderr);
730
d->__nextchar = (char *) "";
740
737
/* Look at and handle the next short option-character. */
743
740
char c = *d->__nextchar++;
744
char *temp = strchr (optstring, c);
741
const char *temp = strchr (optstring, c);
746
743
/* Increment `optind' when we start to process its last character. */
747
744
if (*d->__nextchar == '\0')
750
if (temp == NULL || c == ':')
747
if (temp == NULL || c == ':' || c == ';')
754
#if defined _LIBC && defined USE_IN_LIBIO
759
if (d->__posixly_correct)
761
/* 1003.2 specifies the format of this message. */
762
#if defined _LIBC && defined USE_IN_LIBIO
763
n = __asprintf (&buf, _("%s: illegal option -- %c\n"),
766
fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
771
#if defined _LIBC && defined USE_IN_LIBIO
772
n = __asprintf (&buf, _("%s: invalid option -- %c\n"),
775
fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
779
#if defined _LIBC && defined USE_IN_LIBIO
782
_IO_flockfile (stderr);
784
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
785
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
787
__fxprintf (NULL, "%s", buf);
789
((_IO_FILE *) stderr)->_flags2 = old_flags2;
790
_IO_funlockfile (stderr);
751
#if defined _LIBC && defined USE_IN_LIBIO
756
#if defined _LIBC && defined USE_IN_LIBIO
757
n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"),
760
fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c);
763
#if defined _LIBC && defined USE_IN_LIBIO
766
_IO_flockfile (stderr);
768
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
769
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
771
__fxprintf (NULL, "%s", buf);
773
((_IO_FILE *) stderr)->_flags2 = old_flags2;
774
_IO_funlockfile (stderr);
799
783
/* Convenience. Treat POSIX -W foo same as long option --foo */
800
784
if (temp[0] == 'W' && temp[1] == ';')
803
const struct option *p;
804
const struct option *pfound = NULL;
810
/* This is an option that requires an argument. */
811
if (*d->__nextchar != '\0')
813
d->optarg = d->__nextchar;
814
/* If we end this ARGV-element by taking the rest as an arg,
815
we must advance to the next element now. */
818
else if (d->optind == argc)
822
/* 1003.2 specifies the format of this message. */
823
#if defined _LIBC && defined USE_IN_LIBIO
826
if (__asprintf (&buf,
827
_("%s: option requires an argument -- %c\n"),
830
_IO_flockfile (stderr);
832
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
833
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
835
__fxprintf (NULL, "%s", buf);
837
((_IO_FILE *) stderr)->_flags2 = old_flags2;
838
_IO_funlockfile (stderr);
843
fprintf (stderr, _("%s: option requires an argument -- %c\n"),
848
if (optstring[0] == ':')
855
/* We already incremented `d->optind' once;
856
increment it again when taking next ARGV-elt as argument. */
857
d->optarg = argv[d->optind++];
859
/* optarg is now the argument, see if it's in the
860
table of longopts. */
862
for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '=';
866
/* Test all long options for either exact match
867
or abbreviated matches. */
868
for (p = longopts, option_index = 0; p->name; p++, option_index++)
869
if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
871
if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name))
873
/* Exact match found. */
875
indfound = option_index;
879
else if (pfound == NULL)
881
/* First nonexact match found. */
883
indfound = option_index;
886
/* Second or later nonexact match found. */
893
#if defined _LIBC && defined USE_IN_LIBIO
896
if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
897
argv[0], argv[d->optind]) >= 0)
899
_IO_flockfile (stderr);
901
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
902
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
904
__fxprintf (NULL, "%s", buf);
906
((_IO_FILE *) stderr)->_flags2 = old_flags2;
907
_IO_funlockfile (stderr);
912
fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
913
argv[0], argv[d->optind]);
916
d->__nextchar += strlen (d->__nextchar);
922
option_index = indfound;
925
/* Don't test has_arg with >, because some C compilers don't
926
allow it to be used on enums. */
928
d->optarg = nameend + 1;
933
#if defined _LIBC && defined USE_IN_LIBIO
936
if (__asprintf (&buf, _("\
937
%s: option `-W %s' doesn't allow an argument\n"),
938
argv[0], pfound->name) >= 0)
940
_IO_flockfile (stderr);
942
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
943
((_IO_FILE *) stderr)->_flags2
944
|= _IO_FLAGS2_NOTCANCEL;
946
__fxprintf (NULL, "%s", buf);
948
((_IO_FILE *) stderr)->_flags2 = old_flags2;
949
_IO_funlockfile (stderr);
954
fprintf (stderr, _("\
955
%s: option `-W %s' doesn't allow an argument\n"),
956
argv[0], pfound->name);
960
d->__nextchar += strlen (d->__nextchar);
964
else if (pfound->has_arg == 1)
966
if (d->optind < argc)
967
d->optarg = argv[d->optind++];
972
#if defined _LIBC && defined USE_IN_LIBIO
975
if (__asprintf (&buf, _("\
976
%s: option `%s' requires an argument\n"),
977
argv[0], argv[d->optind - 1]) >= 0)
979
_IO_flockfile (stderr);
981
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
982
((_IO_FILE *) stderr)->_flags2
983
|= _IO_FLAGS2_NOTCANCEL;
985
__fxprintf (NULL, "%s", buf);
987
((_IO_FILE *) stderr)->_flags2 = old_flags2;
988
_IO_funlockfile (stderr);
994
_("%s: option `%s' requires an argument\n"),
995
argv[0], argv[d->optind - 1]);
998
d->__nextchar += strlen (d->__nextchar);
999
return optstring[0] == ':' ? ':' : '?';
1002
d->__nextchar += strlen (d->__nextchar);
1003
if (longind != NULL)
1004
*longind = option_index;
1007
*(pfound->flag) = pfound->val;
1012
d->__nextchar = NULL;
1013
return 'W'; /* Let the application handle it. */
787
const struct option *p;
788
const struct option *pfound = NULL;
794
/* This is an option that requires an argument. */
795
if (*d->__nextchar != '\0')
797
d->optarg = d->__nextchar;
798
/* If we end this ARGV-element by taking the rest as an arg,
799
we must advance to the next element now. */
802
else if (d->optind == argc)
806
#if defined _LIBC && defined USE_IN_LIBIO
809
if (__asprintf (&buf,
810
_("%s: option requires an argument -- '%c'\n"),
813
_IO_flockfile (stderr);
815
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
816
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
818
__fxprintf (NULL, "%s", buf);
820
((_IO_FILE *) stderr)->_flags2 = old_flags2;
821
_IO_funlockfile (stderr);
827
_("%s: option requires an argument -- '%c'\n"),
832
if (optstring[0] == ':')
839
/* We already incremented `d->optind' once;
840
increment it again when taking next ARGV-elt as argument. */
841
d->optarg = argv[d->optind++];
843
/* optarg is now the argument, see if it's in the
844
table of longopts. */
846
for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '=';
850
/* Test all long options for either exact match
851
or abbreviated matches. */
852
for (p = longopts, option_index = 0; p->name; p++, option_index++)
853
if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
855
if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name))
857
/* Exact match found. */
859
indfound = option_index;
863
else if (pfound == NULL)
865
/* First nonexact match found. */
867
indfound = option_index;
870
|| pfound->has_arg != p->has_arg
871
|| pfound->flag != p->flag
872
|| pfound->val != p->val)
873
/* Second or later nonexact match found. */
880
#if defined _LIBC && defined USE_IN_LIBIO
883
if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"),
884
argv[0], d->optarg) >= 0)
886
_IO_flockfile (stderr);
888
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
889
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
891
__fxprintf (NULL, "%s", buf);
893
((_IO_FILE *) stderr)->_flags2 = old_flags2;
894
_IO_funlockfile (stderr);
899
fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"),
903
d->__nextchar += strlen (d->__nextchar);
909
option_index = indfound;
912
/* Don't test has_arg with >, because some C compilers don't
913
allow it to be used on enums. */
915
d->optarg = nameend + 1;
920
#if defined _LIBC && defined USE_IN_LIBIO
923
if (__asprintf (&buf, _("\
924
%s: option '-W %s' doesn't allow an argument\n"),
925
argv[0], pfound->name) >= 0)
927
_IO_flockfile (stderr);
929
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
930
((_IO_FILE *) stderr)->_flags2
931
|= _IO_FLAGS2_NOTCANCEL;
933
__fxprintf (NULL, "%s", buf);
935
((_IO_FILE *) stderr)->_flags2 = old_flags2;
936
_IO_funlockfile (stderr);
941
fprintf (stderr, _("\
942
%s: option '-W %s' doesn't allow an argument\n"),
943
argv[0], pfound->name);
947
d->__nextchar += strlen (d->__nextchar);
951
else if (pfound->has_arg == 1)
953
if (d->optind < argc)
954
d->optarg = argv[d->optind++];
959
#if defined _LIBC && defined USE_IN_LIBIO
962
if (__asprintf (&buf, _("\
963
%s: option '-W %s' requires an argument\n"),
964
argv[0], pfound->name) >= 0)
966
_IO_flockfile (stderr);
968
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
969
((_IO_FILE *) stderr)->_flags2
970
|= _IO_FLAGS2_NOTCANCEL;
972
__fxprintf (NULL, "%s", buf);
974
((_IO_FILE *) stderr)->_flags2 = old_flags2;
975
_IO_funlockfile (stderr);
980
fprintf (stderr, _("\
981
%s: option '-W %s' requires an argument\n"),
982
argv[0], pfound->name);
985
d->__nextchar += strlen (d->__nextchar);
986
return optstring[0] == ':' ? ':' : '?';
991
d->__nextchar += strlen (d->__nextchar);
993
*longind = option_index;
996
*(pfound->flag) = pfound->val;
1001
d->__nextchar = NULL;
1002
return 'W'; /* Let the application handle it. */
1015
1004
if (temp[1] == ':')
1019
/* This is an option that accepts an argument optionally. */
1020
if (*d->__nextchar != '\0')
1022
d->optarg = d->__nextchar;
1027
d->__nextchar = NULL;
1031
/* This is an option that requires an argument. */
1032
if (*d->__nextchar != '\0')
1034
d->optarg = d->__nextchar;
1035
/* If we end this ARGV-element by taking the rest as an arg,
1036
we must advance to the next element now. */
1039
else if (d->optind == argc)
1043
/* 1003.2 specifies the format of this message. */
1008
/* This is an option that accepts an argument optionally. */
1009
if (*d->__nextchar != '\0')
1011
d->optarg = d->__nextchar;
1016
d->__nextchar = NULL;
1020
/* This is an option that requires an argument. */
1021
if (*d->__nextchar != '\0')
1023
d->optarg = d->__nextchar;
1024
/* If we end this ARGV-element by taking the rest as an arg,
1025
we must advance to the next element now. */
1028
else if (d->optind == argc)
1044
1032
#if defined _LIBC && defined USE_IN_LIBIO
1047
if (__asprintf (&buf, _("\
1048
%s: option requires an argument -- %c\n"),
1051
_IO_flockfile (stderr);
1053
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
1054
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
1056
__fxprintf (NULL, "%s", buf);
1058
((_IO_FILE *) stderr)->_flags2 = old_flags2;
1059
_IO_funlockfile (stderr);
1035
if (__asprintf (&buf, _("\
1036
%s: option requires an argument -- '%c'\n"),
1039
_IO_flockfile (stderr);
1041
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
1042
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
1044
__fxprintf (NULL, "%s", buf);
1046
((_IO_FILE *) stderr)->_flags2 = old_flags2;
1047
_IO_funlockfile (stderr);
1065
_("%s: option requires an argument -- %c\n"),
1053
_("%s: option requires an argument -- '%c'\n"),
1070
if (optstring[0] == ':')
1076
/* We already incremented `optind' once;
1077
increment it again when taking next ARGV-elt as argument. */
1078
d->optarg = argv[d->optind++];
1079
d->__nextchar = NULL;
1058
if (optstring[0] == ':')
1064
/* We already incremented `optind' once;
1065
increment it again when taking next ARGV-elt as argument. */
1066
d->optarg = argv[d->optind++];
1067
d->__nextchar = NULL;