X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=fips.c;h=fca2da8ec7c6e6df1c9d199e8e3f5b470d088548;hb=99eeb7e0771887efc60f295db6a30a76c677c933;hp=370a2eefab16d28c25b74eb87b645cee2d3c1a9b;hpb=b32aa136d3e51a250e58c0fc28162b5e5fd52f67;p=fips diff --git a/fips.c b/fips.c index 370a2ee..fca2da8 100644 --- a/fips.c +++ b/fips.c @@ -19,8 +19,8 @@ * THE SOFTWARE. */ -#include -#include +#include "fips.h" + #include #include @@ -43,7 +43,17 @@ main (int argc, char *argv[]) { int opt, ret; - 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}