findstr: Minimal implementation
Nikolay Sivov
bunglehead at gmail.com
Sun Aug 30 06:31:43 CDT 2015
Hi, Mikhail.
Some comments:
> +static void __cdecl printError(unsigned int id, ...)
Why explicit __cdecl?
> + WCHAR format[1024];
Here, and everywhere else - please use 4 spaces per indentation level
instead of a tab.
> + if (!LoadStringW(GetModuleHandleW(NULL), id, format, sizeof(format) / sizeof(format[0])))
I think calling it as LoadStringW(NULL, ...) has same effect.
> +int find(WCHAR* patternW, WCHAR* filename)
This should be static.
> + WideCharToMultiByte(CP_OEMCP, 0, patternW, -1, pattern, patternLen, NULL, NULL);
Why OEMCP and not ACP?
> + // Latest char, include them to line
Please avoid this C99/C++ comment style.
More information about the wine-devel
mailing list