On Mon, 2007-06-11 at 23:10 -0700, James Hawkins wrote:
This would still be clearer and more efficient if you set up a function pointer at the beginning of the tests, and just use that function for the rest of the tests. You make a helper function that tests which version (A or W) works, and assign the working version to the function pointer. This way, you don't have to deal with a useW variable, or any of that mess, and other people can write direct tests without having to use ok_install (which really shouldn't be needed if you use a function pointer). Keep in mind you'll have to use void pointers for the string parameters when declaring the function pointer type.
More succinctly, what would be the advantage of a test function checking this function pointer you propose and then doing ANSI->Unicode or vice versa conversions itself over just calling the _InstallHinfSection function that already exists in my patch and does the appropriate conversions and then calls the appropriate function?
Thanks Misha