On Tue, Sep 11, 2018 at 08:04:50PM +0300, Gabriel Ivăncescu wrote:
On Tue, Sep 11, 2018 at 2:54 PM, Huw Davies huw@codeweavers.com wrote:
No. I'm not signing off on this. You're going to have to come on with a much cleaner way to do this.
What specifically? The goto after the displayall stuff, or the three nested ifs there? Obviously, my first thought was to just break off on the first if, but then it would change the indentation and the patch would be much larger (same as with my initial patches with heap_alloc failure). I can't split it either, since otherwise the label wouldn't exist and it would fail to compile. (even if it did compile being split, it would amount of wrong usage results, half of it WM_KEYDOWN and no WM_CHAR etc)
If it's the goto... I don't know how to handle it differently without some other ugly complication, or a lot more code / changes.
Specifically the gotos, but I've already commented on the high identation level in this function (I know that's not your fault).
It seems to me that you want the WM_KEYDOWN handler to call the WM_CHAR handler. At the risk of repeating myself, having the handlers as a helper functions would make this easier.
Huw.