Nigel Liang wrote:
Hi,
Some changes suggested by Dan.
Changelist:
- Initialize non-static local arrays at runtime or make them static
- Use CompareStringW to do case-insensitive comparison
- Initialize some static variables before use and clear them after
- Rename a global variable
- Move some hard-coded strings into En.rc
- Got rid of some magic numbers in the code
- Use 4 space indentation
-Nigel
Hi,
You leak several registry handles in failure cases, for example in
GetFilenameFromFacename:
+ if (lRet != ERROR_SUCCESS) { + WINE_TRACE("RegQueryValueExW facename: %s, returned: %ld\n", + wine_dbgstr_w(facename), lRet); + return 1; + }
or ClearFontLinkRegistry:
+ if (lReturn != ERROR_SUCCESS) { + WINE_TRACE("RegSetValueExW returned: %ld\n", lReturn); + return 1; + }
and a few more.
Cheers,
Paul.