Revision 84bf226b

View differences:

cmdutils.c
59 59
void parse_options(int argc, char **argv, const OptionDef *options)
60 60
{
61 61
    const char *opt, *arg;
62
    int optindex;
62
    int optindex, handleoptions;
63 63
    const OptionDef *po;
64 64

  
65 65
    /* parse options */
......
67 67
    while (optindex < argc) {
68 68
        opt = argv[optindex++];
69 69

  
70
        if (opt[0] == '-' && opt[1] != '\0') {
70
        if (handleoptions && opt[0] == '-' && opt[1] != '\0') {
71
          if (opt[1] == '-' && opt[2] == '\0') {
72
            handleoptions = 0;
73
            continue;
74
          }
71 75
            po= find_option(options, opt + 1);
72 76
            if (!po->name)
73 77
                po= find_option(options, "default");

Also available in: Unified diff