On Fri, Dec 21, 2018 at 12:29:37AM +0100, Fabian Maurer wrote:
I'm still investigating that file format that I mentioned some time ago (see https://www.winehq.org/pipermail/wine-devel/2017-July/118544.html), but I'm progressing. In short, to implement uiribbon, we need to be able to parse a binary blob that specifies how the ribbon looks like and how it behaves.
I'm currently at a state where my understanding is at least partially usable, and I wanted to start writing tests to cement my progress. However, I'd like to write it in a format that would be acceptable for wine upstream from the start.
Most problematic is the parser for the binary blob, IMHO. Is there already something similar where I could take some hints regarding style? For example how to best handle the whole error checking thing, add debug logging or how to handle memory allocation/freeing.
Hi Fabian,
This a great!
I suspect how you write the parser will depend to some extent on the format of the binary blob itself, so I'd suggest getting a good understanding of that before you attack the coding. Yes, writing tests for this will help a lot. If it turns out to basically be a binary representation of xml, then it may be appropriate to look at an xml parser (e.g. dlls/ntdll/actct.x).
Once you start coding, you could send the outline parser or tests to wine-devel as an RFC. The good news is that figuring out the format of the blob is likely to take much longer than actually coding, so any false steps that you might make are not going to affect the overall effort too much.
Huw.