Displaying 2 results from an estimated 2 matches for "9d9737e".
Did you mean:
99737
2016 Jul 13
0
[PATCH v3 2/2] mllib: Getopt: support hidden options
..., Unit (display_short_options t), hidden_option_description;
+ [ "--long-options" ], Unit (display_long_options t), hidden_option_description;
] in
(* Decide whether the help option can be added, and which switches use. *)
diff --git a/mllib/getopt.mli b/mllib/getopt.mli
index 9d9737e..2a8bada 100644
--- a/mllib/getopt.mli
+++ b/mllib/getopt.mli
@@ -47,6 +47,8 @@ type anon_fun = (string -> unit)
type speclist = (keys * spec * doc) list
+val hidden_option_description : string
+
val compare_command_line_args : string -> string -> int
(** Compare command line argume...
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
...eys, spec, doc) ->
+ Array.of_list keys, spec, doc
+ ) t.specs in
+ let specs = Array.of_list specs in
+ getopt_parse argv specs ?anon_fun:t.anon_fun t.usage_msg
+
+let parse t =
+ parse_argv t Sys.argv
diff --git a/mllib/getopt.mli b/mllib/getopt.mli
new file mode 100644
index 0000000..9d9737e
--- /dev/null
+++ b/mllib/getopt.mli
@@ -0,0 +1,87 @@
+(* Command line handling for OCaml tools in libguestfs.
+ * Copyright (C) 2016 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+...