This makes it much easier to pass options to the program being
executed by fips. The options can be passed directly, such as:
fips glxgears -fullscreen
Previous, to this commit, one would have to use a syntax such as:
fips -- glxgears -fullscreen
to prevent fips from trying to interpret the "-fullscreen" argument as
options to fips itself.
- const char *short_options = "h";
+ /* The initial '+' means that getopt will stop looking for
+ * options after the first non-option argument. This means
+ * that a command such as:
+ *
+ * fips glxgears -fullscreen
+ *
+ * Will do what is intended, (namely, have fips invoke
+ * "glxgears -fullscreen" rather than trying to interpret
+ * -fullscreen as options to fips itself.
+ */
+ const char *short_options = "+h";
const struct option long_options[] = {
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
const struct option long_options[] = {
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}