search for: longopt

Displaying 20 results from an estimated 54 matches for "longopt".

Did you mean: longopts
2014 Nov 26
5
[PATCH] tools: implement --short-options
Just like --long-options, it makes it possible to know which short options are supported by each tool; this can help improving the bash completion, for example. --- align/scan.c | 3 +++ builder/cmdline.ml | 1 + cat/cat.c | 3 +++ cat/filesystems.c | 3 +++ cat/log.c | 3 +++ cat/ls.c | 3 +++
2017 Jun 10
0
Pacaging/build issues with AIX and vac (dovecot-2.2.25)
...r cannot be applied to a pointer to an incomplete struct or union. make[1]: *** [doveadm-cmd.o] Error 1 +428 static void +429 doveadm_build_options(const struct doveadm_cmd_param par[], +430 string_t *shortopts, +431 ARRAY_TYPE(getopt_option_array) *longopts) +432 { +433 for(size_t i=0; par[i].name != NULL; i++) { +434 struct option longopt; +435 +436 i_zero(&longopt); +437 longopt.name = par[i].name; +438 if (par[i].short_opt != '\0') { +...
2017 Mar 24
1
[PATCH] bash: Implement tab completion for virt-win-reg (RHBZ#1367738).
...v2v-copy-to-local @@ -15,28 +15,39 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -_virt_v2v_copy_to_local () +_guestfs_options_only () { local cur prev words cword split - local shortopts longopts items + local shortopts longopts tool="$1" _init_completion -s || return case "$cur" in --*) # --options - longopts="$(virt-v2v-copy-to-local --long-options)" + longopts="$($tool --long-options)"...
2018 Jan 24
1
[nbdkit PATCH] maint: Improve ./nbdkit handling of --opt=value
Although useful for in-tree debugging, the ./nbdkit script was not very nice when it comes to using the '--longopt=value' single-string form of options, compared to the two-string '--longopt value' form. Since we used a glob for the multiple spellings of --exportname and --pidfile, the script would try to treat the next argument literally instead of recognizing that the argument was already consumed...
2017 Mar 22
2
[PATCH] bash: Add a bash completion script for virt-v2v-copy-to-local (RHBZ#1367738).
...u should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +_virt_v2v_copy_to_local () +{ + local cur prev words cword split + local shortopts longopts items + + _init_completion -s || return + + case "$cur" in + --*) + # --options + longopts="$(virt-v2v-copy-to-local --long-options)" + COMPREPLY=( $(compgen -W "$longopts" -- "$cur") ) + return ;; +...
2016 Aug 25
7
[PATCH 0/5] bash completion: Add missing bash completion scripts (RHBZ#1367738).
This implements most of RHBZ#1367738. I didn't bother with virt-v2v-copy-to-local and virt-win-reg, but all the other tools now have full bash completion. Rich.
2016 Oct 09
6
Pacaging/build issues with AIX and vac (dovecot-2.2.25)
Hi. I finally decided it was really time to stop being lazy and really move away from gmail. After I have a server in my basement using power, etc. So I turned on the imap provided - and did not quite cry - it will have to do for now, but imap2 is wanting. A real server yes, but not Linux. (Using linux would require another server AND I would feel I am being lazy again). So, I downloaded
2019 Jul 11
1
[p2v PATCH] Add bash completion scripts
...+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +_p2v_options_only () +{ + local cur prev words cword split + local shortopts longopts tool="$1" + + _init_completion -s || return + + case "$cur" in + --*) + # --options + longopts="$($tool --long-options)" + COMPREPLY=( $(compgen -W "$longopts" -- "$cur") ) + return ;; +...
2016 Aug 25
0
[PATCH 5/5] bash completion: Add missing bash completion scripts (RHBZ#1367738).
...You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -_guestfs_options_only () -{ - local cur prev words cword split - local shortopts longopts tool="$1" - - _init_completion -s || return - - case "$prev" in - --align-first) - COMPREPLY=( $( compgen -W "never always auto" -- "$cur") ) - return ;; - --check-tmpdir) - COMPREPLY=( $( compgen -W &quot...
2016 Jul 11
2
[PATCH v2] OCaml tools: add and use a Getopt module
...+{ + CAMLparam4 (argsv, specsv, anon_funv, usage_msgv); + CAMLlocal5 (specv, keysv, actionv, v, v2); + size_t argc; + CLEANUP_FREE_STRING_LIST char **argv = NULL; + size_t specs_len, i; + CLEANUP_FREE char *optstring = NULL; + int optstring_len = 0; + CLEANUP_FREE_OPTION_LIST struct option *longopts = NULL; + int longopts_len = 0; + int c; + int specv_index; + + argc = Wosize_val (argsv); + argv = malloc (sizeof (char *) * (argc + 1)); + if (argv == NULL) + caml_raise_out_of_memory (); + for (i = 0; i < argc; ++i) { + argv[i] = strdup (String_val (Field (argsv, i))); + if (...
2018 Nov 08
0
[nbdkit PATCH v2 1/5] maint: Improve ./nbdkit option parsing
...e option instead. Fix by incrementing i in that case label. Attempting './nbdkit --ipaddr=$addr plugin' doesn't special case 'plugin' properly, because we forgot to special-case '--ip*=*' similarly to --export and --pid. Fix by generalizing the early glob to catch ALL longopts used with = rather than just a select few, but only after we have handled the special-casing of --filter[=] first (the biggest part of this patch is thus code motion). We forgot to add -D/--debug and --log from recent command line additions. Fix by adding more patterns; and split the long line w...
2018 Aug 20
1
[PATCH] common/mltools: getopt: add Getopt.OptString
...optstring[optstring_len++] = key[0]; - if (has_arg) + if (has_arg > 0) { optstring[optstring_len++] = ':'; + if (has_arg > 1) + optstring[optstring_len++] = ':'; + } } else { struct option *newopts = realloc (longopts, (longopts_len + 1 + 1) * sizeof (*longopts)); if (newopts == NULL) @@ -393,6 +400,17 @@ guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, valu do_call1 (v, v2); break; + case 8: /* OptString of string * (string option -> unit) */ + v...
2020 Mar 10
1
[v2v PATCH] bash: remove extra registrations
...sh/virt-v2v-copy-to-local @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -_guestfs_options_only () +_v2v_options_only () { local cur prev words cword split local shortopts longopts tool="$1" @@ -42,18 +42,6 @@ _guestfs_options_only () _virt_v2v_copy_to_local () { - _guestfs_options_only "virt-v2v-copy-to-local" + _v2v_options_only "virt-v2v-copy-to-local" } && complete -o default -F _virt_v2v_copy_to_local virt-v2v-copy-to-lo...
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
...+{ + CAMLparam4 (argsv, specsv, anon_funv, usage_msgv); + CAMLlocal5 (specv, keysv, actionv, v, v2); + size_t argc; + CLEANUP_FREE_STRING_LIST char **argv = NULL; + size_t specs_len, i; + CLEANUP_FREE char *optstring = NULL; + int optstring_len = 0; + CLEANUP_FREE_OPTION_LIST struct option *longopts = NULL; + int longopts_len = 0; + int c; + int specv_index; + + argc = Wosize_val (argsv); + argv = malloc (sizeof (char *) * (argc + 1)); + if (argv == NULL) + caml_raise_out_of_memory (); + for (i = 0; i < argc; ++i) { + argv[i] = strdup (String_val (Field (argsv, i))); + if (...
2018 Aug 21
0
[PATCH 1/2] common/mltools: getopt: add Getopt.OptString
...optstring[optstring_len++] = key[0]; - if (has_arg) + if (has_arg > 0) { optstring[optstring_len++] = ':'; + if (has_arg > 1) + optstring[optstring_len++] = ':'; + } } else { struct option *newopts = realloc (longopts, (longopts_len + 1 + 1) * sizeof (*longopts)); if (newopts == NULL) @@ -393,6 +400,17 @@ guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, valu do_call1 (v, v2); break; + case 8: /* OptString of string * (string option -> unit) */ + v...
2016 Jun 24
2
[PATCH] RFC: OCaml tools: add and use a Getopt module
...lue usage_msgv) +{ + CAMLparam4 (argsv, specsv, anon_funv, usage_msgv); + CAMLlocal4 (specv, keysv, actionv, v); + size_t argc; + CLEANUP_FREE_STRING_LIST char **argv = NULL; + size_t specs_len, i; + CLEANUP_FREE char *optstring = NULL; + int optstring_len = 0; + CLEANUP_FREE struct option *longopts = NULL; + int longopts_len = 0; + int c; + int specv_index; + + argc = Wosize_val (argsv); + argv = malloc (sizeof (char *) * (argc + 1)); + if (argv == NULL) + caml_raise_out_of_memory (); + for (i = 0; i < argc; ++i) { + argv[i] = strdup (String_val (Field (argsv, i))); + if (...
2019 Aug 01
0
[PATCH v2 07/11] VSOCK: add AF_VSOCK test cases
....run_server = test_stream_server_close_server, + }, + { + .name = "SOCK_STREAM multiple connections", + .run_client = test_stream_multiconn_client, + .run_server = test_stream_multiconn_server, + }, + {}, +}; + +static const char optstring[] = ""; +static const struct option longopts[] = { + { + .name = "control-host", + .has_arg = required_argument, + .val = 'H', + }, + { + .name = "control-port", + .has_arg = required_argument, + .val = 'P', + }, + { + .name = "mode", + .has_arg = required_argument, + .val = 'm',...
2006 Jan 30
3
RMySQL install
...t_r.so.14.0.0 libmysqlclient.so.10 -> libmysqlclient.so.10.0.0 just to make sure the headers are actually in the specified location... [root at BX mtaylor]# ls /usr/include/mysql chardefs.h m_ctype.h my_dir.h my_no_pthread.h mysql_embed.h my_xml.h rlshell.h sslopt-longopts.h errmsg.h m_string.h my_getopt.h my_pthread.h mysql.h raid.h rltypedefs.h sslopt-vars.h history.h my_alloc.h my_global.h my_semaphore.h mysql_time.h readline.h sql_common.h tilde.h keycache.h my_config.h my_list.h mysql_com.h mysql_version.h...
2005 Jun 29
1
Can't build cdr_addon_mysql.
...789 May 13 06:14 rltypedefs.h -rw-r--r-- 1 root root 1751 May 13 06:14 sql_common.h -rw-r--r-- 1 root root 6401 May 13 06:14 sql_state.h -rw-r--r-- 1 root root 1055 May 13 06:14 sslopt-case.h -rw-r--r-- 1 root root 1883 May 13 06:14 sslopt-longopts.h -rw-r--r-- 1 root root 970 May 13 06:14 sslopt-vars.h -rw-r--r-- 1 root root 3022 May 13 06:14 tilde.h -rw-r--r-- 1 root root 1265 May 13 06:14 typelib.h -rw-r--r-- 1 root root 1439 May 13 06:14 xmalloc.h -- Chris Mason NetConcepts (...
2019 Oct 09
2
[PATCH v2 07/11] VSOCK: add AF_VSOCK test cases
..._STREAM multiple connections", > + .run_client = test_stream_multiconn_client, > + .run_server = test_stream_multiconn_server, > + }, > + {}, > +}; > + > +static const char optstring[] = ""; > +static const struct option longopts[] = { > + { > + .name = "control-host", > + .has_arg = required_argument, > + .val = 'H', > + }, > + { > + .name = "control-port", > + .has_arg = required_arg...