diff options
Diffstat (limited to 'src/util/getopt.c')
-rw-r--r-- | src/util/getopt.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/util/getopt.c b/src/util/getopt.c index acc1b6535..6dfad96da 100644 --- a/src/util/getopt.c +++ b/src/util/getopt.c | |||
@@ -878,16 +878,7 @@ GNgetopt_long (int argc, | |||
878 | 878 | ||
879 | /* ******************** now the GNUnet specific modifications... ********************* */ | 879 | /* ******************** now the GNUnet specific modifications... ********************* */ |
880 | 880 | ||
881 | /** | 881 | |
882 | * Parse the command line. | ||
883 | * | ||
884 | * @param binaryOptions Name of application with option summary | ||
885 | * @param allOptions defined options and handlers | ||
886 | * @param argc number of arguments | ||
887 | * @param argv actual arguments | ||
888 | * @return index into argv with first non-option | ||
889 | * argument, or #GNUNET_SYSERR on error | ||
890 | */ | ||
891 | int | 882 | int |
892 | GNUNET_GETOPT_run (const char *binaryOptions, | 883 | GNUNET_GETOPT_run (const char *binaryOptions, |
893 | const struct GNUNET_GETOPT_CommandLineOption *allOptions, | 884 | const struct GNUNET_GETOPT_CommandLineOption *allOptions, |
@@ -899,7 +890,7 @@ GNUNET_GETOPT_run (const char *binaryOptions, | |||
899 | int count; | 890 | int count; |
900 | char *shorts; | 891 | char *shorts; |
901 | int spos; | 892 | int spos; |
902 | int cont; | 893 | enum GNUNET_GenericReturnValue cont; |
903 | uint8_t *seen; | 894 | uint8_t *seen; |
904 | unsigned int optmatch = 0; | 895 | unsigned int optmatch = 0; |
905 | const char *have_exclusive = NULL; | 896 | const char *have_exclusive = NULL; |
@@ -944,7 +935,11 @@ GNUNET_GETOPT_run (const char *binaryOptions, | |||
944 | unsigned int i; | 935 | unsigned int i; |
945 | int c; | 936 | int c; |
946 | 937 | ||
947 | c = GNgetopt_long (argc, argv, shorts, long_options, &option_index); | 938 | c = GNgetopt_long (argc, |
939 | argv, | ||
940 | shorts, | ||
941 | long_options, | ||
942 | &option_index); | ||
948 | if (c == GNUNET_SYSERR) | 943 | if (c == GNUNET_SYSERR) |
949 | break; /* No more flags to process */ | 944 | break; /* No more flags to process */ |
950 | 945 | ||
@@ -971,7 +966,9 @@ GNUNET_GETOPT_run (const char *binaryOptions, | |||
971 | } | 966 | } |
972 | if (i == count) | 967 | if (i == count) |
973 | { | 968 | { |
974 | fprintf (stderr, _ ("Use %s to get a list of options.\n"), "--help"); | 969 | fprintf (stderr, |
970 | _ ("Use %s to get a list of options.\n"), | ||
971 | "--help"); | ||
975 | cont = GNUNET_SYSERR; | 972 | cont = GNUNET_SYSERR; |
976 | } | 973 | } |
977 | } | 974 | } |