search for: opt_with_arg

Displaying 4 results from an estimated 4 matches for "opt_with_arg".

2018 Nov 14
0
Re: [PATCH 2/2] build: Replace ./nbdkit with a C program.
...he reverse lookup into long_options when you > can just hardcode passthru("--format")? > > >+ passthru_format ("%s/filters/%s/.libs/nbdkit-%s-filter.so", > >+ builddir, optarg, optarg); > >+ } > >+ else goto opt_with_arg; > >+ } > >+ else if (c == 'v') { > >+ /* Verbose is special because we will print the final command. */ > >+ verbose = 1; > >+ passthru_format ("--%s", long_options[long_index].name); > > Okay, here if you don't revers...
2018 Nov 14
2
Re: [PATCH 2/2] build: Replace ./nbdkit with a C program.
...bother with formatting the reverse lookup into long_options when you can just hardcode passthru("--format")? > + passthru_format ("%s/filters/%s/.libs/nbdkit-%s-filter.so", > + builddir, optarg, optarg); > + } > + else goto opt_with_arg; > + } > + else if (c == 'v') { > + /* Verbose is special because we will print the final command. */ > + verbose = 1; > + passthru_format ("--%s", long_options[long_index].name); Okay, here if you don't reverse map long_index when the user...
2018 Nov 13
0
[PATCH 2/2] build: Replace ./nbdkit with a C program.
...s_short_name (optarg)) { + passthru_format ("--%s", /* --filter */ + long_options[long_index].name); + passthru_format ("%s/filters/%s/.libs/nbdkit-%s-filter.so", + builddir, optarg, optarg); + } + else goto opt_with_arg; + } + else if (c == 'v') { + /* Verbose is special because we will print the final command. */ + verbose = 1; + passthru_format ("--%s", long_options[long_index].name); + } + else if (long_options[long_index].has_arg) { + /* Remaining options that...
2018 Nov 13
3
[PATCH 0/2] build: Replace ./nbdkit with a C program.
This patch series solves the FreeBSD shebang problem in a completely different way, and a few other things besides. I propose that we replace ./nbdkit with a C program. The C program is a straightforward translation of the shell script. Some advantages of this approach are: - We can parse options in exactly the same way as the real program. - Use the more accurate ‘is_short_name’ test for