Re: GOption-multiple arguments with exclude parameters



something like this maybe?...

  GOptionEntry options[] = {
    { "verbose", 0, 0, G_OPTION_ARG_NONE, &gbverbose, "Add verbose output to standard log", NULL },
    { "version", 0, 0, G_OPTION_ARG_NONE, &gbversion, "Print version information on standard output", NULL },
    { "parse",   0, 0, G_OPTION_ARG_NONE, &gcparse, "Parse the program, print errors on standard error", NULL },       
    { "scan",    0, 0, G_OPTION_ARG_NONE, &gscan, "Scan the file", NULL }
    { "f",       0, 0, G_OPTION_ARG_FILENAME, &filename, "File name", NULL }
    { NULL }
  };


or just skip the 'f' option and throw an error if either parse or scan
are used but no filename is given.

- Anna



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]