Forgot to cc wine-devel.
Alexandre Julliard wrote:
You should really split it into separate files, a 40,000 lines file is a bit too much. Also all this data must be constant and in a read-only section, it's eating 400k of data space right now.
I actually gave quite a bit of thought to the large file issue before submitting it, and I would agree with you if there were any functional code in the file. Because it's entirely data, and it's heavily interdependent, I really think that one file is better. (As the person most likely be tweaking the data in the near future, I can tell you that having a single file to edit, albeit a long one, will be heck of a lot easier than having 39 separate files, and isn't that really the point?)
From a build point of view, gcc has no problem at all with the file. In
fact it compiles much faster than many of Wine's functional files. If a target compiler (does Wine build with anything other than gcc?) does have a problem with it, I will yield to necessity. Until that happens, how- ever, I believe that the practical benefit of maintainability outweighs stylistic concerns. (After all, it's not like anyone will ever need to read all the way through the file to understand it, as is the case with functional code.)
I would like to make the data constant, but that would require major surgery to afm.c, which is more than I can take on at this point. Keep in mind that the same amount of memory is being used currently; it's just dynamically allocated as the AFM files are read in.
I'm guessing that you have a script to generate all this; could you please consider submitting it? This way other people can make changes too.
I have attached the two programs I use to generate agl.c. I have always intended to submit them, but didn't know where in the source tree to put them.