diff options
Diffstat (limited to 'src/util/getopt.c')
-rw-r--r-- | src/util/getopt.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/util/getopt.c b/src/util/getopt.c index 08c133423..169949821 100644 --- a/src/util/getopt.c +++ b/src/util/getopt.c | |||
@@ -669,7 +669,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
669 | if (ambig && !exact) | 669 | if (ambig && !exact) |
670 | { | 670 | { |
671 | if (GNopterr) | 671 | if (GNopterr) |
672 | fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], | 672 | FPRINTF (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], |
673 | argv[GNoptind]); | 673 | argv[GNoptind]); |
674 | nextchar += strlen (nextchar); | 674 | nextchar += strlen (nextchar); |
675 | GNoptind++; | 675 | GNoptind++; |
@@ -692,12 +692,12 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
692 | { | 692 | { |
693 | if (argv[GNoptind - 1][1] == '-') | 693 | if (argv[GNoptind - 1][1] == '-') |
694 | /* --option */ | 694 | /* --option */ |
695 | fprintf (stderr, | 695 | FPRINTF (stderr, |
696 | _("%s: option `--%s' does not allow an argument\n"), | 696 | _("%s: option `--%s' does not allow an argument\n"), |
697 | argv[0], pfound->name); | 697 | argv[0], pfound->name); |
698 | else | 698 | else |
699 | /* +option or -option */ | 699 | /* +option or -option */ |
700 | fprintf (stderr, | 700 | FPRINTF (stderr, |
701 | _("%s: option `%c%s' does not allow an argument\n"), | 701 | _("%s: option `%c%s' does not allow an argument\n"), |
702 | argv[0], argv[GNoptind - 1][0], pfound->name); | 702 | argv[0], argv[GNoptind - 1][0], pfound->name); |
703 | } | 703 | } |
@@ -715,7 +715,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
715 | { | 715 | { |
716 | if (GNopterr) | 716 | if (GNopterr) |
717 | { | 717 | { |
718 | fprintf (stderr, _("%s: option `%s' requires an argument\n"), | 718 | FPRINTF (stderr, _("%s: option `%s' requires an argument\n"), |
719 | argv[0], argv[GNoptind - 1]); | 719 | argv[0], argv[GNoptind - 1]); |
720 | } | 720 | } |
721 | nextchar += strlen (nextchar); | 721 | nextchar += strlen (nextchar); |
@@ -744,11 +744,11 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
744 | { | 744 | { |
745 | if (argv[GNoptind][1] == '-') | 745 | if (argv[GNoptind][1] == '-') |
746 | /* --option */ | 746 | /* --option */ |
747 | fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], | 747 | FPRINTF (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], |
748 | nextchar); | 748 | nextchar); |
749 | else | 749 | else |
750 | /* +option or -option */ | 750 | /* +option or -option */ |
751 | fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], | 751 | FPRINTF (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], |
752 | argv[GNoptind][0], nextchar); | 752 | argv[GNoptind][0], nextchar); |
753 | } | 753 | } |
754 | nextchar = (char *) ""; | 754 | nextchar = (char *) ""; |
@@ -773,9 +773,9 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
773 | { | 773 | { |
774 | if (posixly_correct) | 774 | if (posixly_correct) |
775 | /* 1003.2 specifies the format of this message. */ | 775 | /* 1003.2 specifies the format of this message. */ |
776 | fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); | 776 | FPRINTF (stderr, _("%s: illegal option -- %c\n"), argv[0], c); |
777 | else | 777 | else |
778 | fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); | 778 | FPRINTF (stderr, _("%s: invalid option -- %c\n"), argv[0], c); |
779 | } | 779 | } |
780 | return '?'; | 780 | return '?'; |
781 | } | 781 | } |
@@ -803,7 +803,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
803 | if (GNopterr) | 803 | if (GNopterr) |
804 | { | 804 | { |
805 | /* 1003.2 specifies the format of this message. */ | 805 | /* 1003.2 specifies the format of this message. */ |
806 | fprintf (stderr, _("%s: option requires an argument -- %c\n"), | 806 | FPRINTF (stderr, _("%s: option requires an argument -- %c\n"), |
807 | argv[0], c); | 807 | argv[0], c); |
808 | } | 808 | } |
809 | if (optstring[0] == ':') | 809 | if (optstring[0] == ':') |
@@ -851,7 +851,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
851 | if (ambig && !exact) | 851 | if (ambig && !exact) |
852 | { | 852 | { |
853 | if (GNopterr) | 853 | if (GNopterr) |
854 | fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], | 854 | FPRINTF (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], |
855 | argv[GNoptind]); | 855 | argv[GNoptind]); |
856 | nextchar += strlen (nextchar); | 856 | nextchar += strlen (nextchar); |
857 | GNoptind++; | 857 | GNoptind++; |
@@ -869,7 +869,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
869 | else | 869 | else |
870 | { | 870 | { |
871 | if (GNopterr) | 871 | if (GNopterr) |
872 | fprintf (stderr, _("\ | 872 | FPRINTF (stderr, _("\ |
873 | %s: option `-W %s' does not allow an argument\n"), argv[0], pfound->name); | 873 | %s: option `-W %s' does not allow an argument\n"), argv[0], pfound->name); |
874 | 874 | ||
875 | nextchar += strlen (nextchar); | 875 | nextchar += strlen (nextchar); |
@@ -883,7 +883,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
883 | else | 883 | else |
884 | { | 884 | { |
885 | if (GNopterr) | 885 | if (GNopterr) |
886 | fprintf (stderr, _("%s: option `%s' requires an argument\n"), | 886 | FPRINTF (stderr, _("%s: option `%s' requires an argument\n"), |
887 | argv[0], argv[GNoptind - 1]); | 887 | argv[0], argv[GNoptind - 1]); |
888 | nextchar += strlen (nextchar); | 888 | nextchar += strlen (nextchar); |
889 | return optstring[0] == ':' ? ':' : '?'; | 889 | return optstring[0] == ':' ? ':' : '?'; |
@@ -931,7 +931,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
931 | if (GNopterr) | 931 | if (GNopterr) |
932 | { | 932 | { |
933 | /* 1003.2 specifies the format of this message. */ | 933 | /* 1003.2 specifies the format of this message. */ |
934 | fprintf (stderr, _("%s: option requires an argument -- %c\n"), | 934 | FPRINTF (stderr, _("%s: option requires an argument -- %c\n"), |
935 | argv[0], c); | 935 | argv[0], c); |
936 | } | 936 | } |
937 | if (optstring[0] == ':') | 937 | if (optstring[0] == ':') |
@@ -1035,7 +1035,7 @@ GNUNET_GETOPT_run (const char *binaryOptions, | |||
1035 | } | 1035 | } |
1036 | if (i == count) | 1036 | if (i == count) |
1037 | { | 1037 | { |
1038 | fprintf (stderr, _("Use --help to get a list of options.\n")); | 1038 | FPRINTF (stderr, _("Use %s to get a list of options.\n"), "--help"); |
1039 | cont = GNUNET_SYSERR; | 1039 | cont = GNUNET_SYSERR; |
1040 | } | 1040 | } |
1041 | } | 1041 | } |