On 07/05/2012 06:07 PM, Evan Driscoll wrote:
On 01/-10/-28163 01:59 PM, Vladimir Prus wrote:
that patch of yours looks perfectly reasonable to me. It would seem that a style option, e.g. 'allow_intermixed' can be used to control this behaviour (with the current behaviour as default).
Can I just run the plan by you then?
OK, this is not as clear as I was thinking. (Surprise surprise!) As phrased, this is a backwards-incompatible change. If a client of the library builds their own style_t value from scratch (as opposed to starting from default_style and setting/unsetting bits in that), they'll not set allow_interspersed, and lose interspersed arguments. This was illustrated by the fact that I had to modify three style_t declarations in cmdline_test.cpp to fix test cases that I broke. (Lines 368, 397, and 412 or thereabouts.) If I just pass a literal false as in my original patch, everything is peachy in the unmodified test cases. (I'm not sure I understand why the test cases were failing, but that's probably just because I don't have a holistic enough view of how the test cases are written.) How should I handle this? Cleanest way I can think of that doesn't break compatibility is to add a 'allow_interspersed' style option instead with the opposite sense, but everything else is 'allow_*'. Evan