#171 -p option parsed in unexpected way

closed
nobody
None
5
2013-02-09
2012-10-30
miven
No

xfe -p 2 (note intervening space) and --panel 2 work fine,
but -p0, -p1, -p2, -p3 (no spaces) do not.

So I added these lines to main():

} else if (compare(argv[i], "-p0")==0 ) {
panel_mode = 0;
} else if (compare(argv[i], "-p1")==0 ) {
panel_mode = 1;
} else if (compare(argv[i], "-p2")==0 ) {
panel_mode = 2;
} else if (compare(argv[i], "-p3")==0 ) {
panel_mode = 3;
}

Now it works the way I would expect.

It's the only argument that takes a number so I didn't think it was worth
rewriting the whole routine with getopt or whatever.

Discussion

  • Roland Baudin
    Roland Baudin
    2013-02-09

    • status: open --> closed
     
  • Roland Baudin
    Roland Baudin
    2013-02-09

    Fixed in Xfe 1.34.
    Thanks,
    RB