"Anatoly Lyutin" vostok@etersoft.ru wrote:
-/** +WINE_DEFAULT_DEBUG_CHANNEL(start);
+/*
All these changes /** -> /* make the diff larger, and are not really necessary.
Output given message to stdout without formatting. */ -static void output(const char *message) +static void output(const WCHAR *message) { DWORD count;
- WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), message, strlen(message), &count, NULL);
- DWORD res;
- int wlen = strlenW(message);
Once you change your editor settings to use natural 8 spaces for a tab you will see how ugly the formatting in your new code is.
-static void fatal_error(const char *msg, DWORD error_code) +static void fatal_error(const WCHAR *msg, DWORD error_code)
fatal_error() is not called with strings outside of ASCII charset, so there is no much point in converting it to unicode. It only makes your patch full of controversial changes. IMHO fatal_error() should be removed altogether, and replaced by proper error handling instead.
Dmitry Timoshkov wrote:
"Anatoly Lyutin" vostok@etersoft.ru wrote:
-/** +WINE_DEFAULT_DEBUG_CHANNEL(start);
+/*
All these changes /** -> /* make the diff larger, and are not really necessary.
I have considered it in the new version.
Output given message to stdout without formatting. */ -static void output(const char *message) +static void output(const WCHAR *message) { DWORD count;
- WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), message,
strlen(message), &count, NULL);
- DWORD res;
- int wlen = strlenW(message);
Once you change your editor settings to use natural 8 spaces for a tab you will see how ugly the formatting in your new code is.
I am sorry. I forgot that in the start.c uses natural 8 spaces for a tab. Fixed.
-static void fatal_error(const char *msg, DWORD error_code) +static void fatal_error(const WCHAR *msg, DWORD error_code)
fatal_error() is not called with strings outside of ASCII charset, so there is no much point in converting it to unicode. It only makes your patch full of controversial changes. IMHO fatal_error() should be removed altogether, and replaced by proper error handling instead.
I think that it is the question of time. For example In the future these messages will be probably deduced in the Korean (or Japanese or etc) language. But what proper error handling do you mean?Should I use a FIXME, ERR and so on? I will resend my patch.
"Anatoly Lyutin" vostok@etersoft.ru wrote:
Once you change your editor settings to use natural 8 spaces for a tab you will see how ugly the formatting in your new code is.
I am sorry. I forgot that in the start.c uses natural 8 spaces for a tab. Fixed.
The whole Wine tree uses 8 spaces for a tab.
-static void fatal_error(const char *msg, DWORD error_code) +static void fatal_error(const WCHAR *msg, DWORD error_code)
fatal_error() is not called with strings outside of ASCII charset, so there is no much point in converting it to unicode. It only makes your patch full of controversial changes. IMHO fatal_error() should be removed altogether, and replaced by proper error handling instead.
I think that it is the question of time. For example In the future these messages will be probably deduced in the Korean (or Japanese or etc) language. But what proper error handling do you mean?Should I use a FIXME, ERR and so on?
A proper error handling IMO is to return an error to the caller instead of terminating the app.
Dmitry Timoshkov wrote:
"Anatoly Lyutin" vostok@etersoft.ru wrote:
The whole Wine tree uses 8 spaces for a tab.
Hm. I thought that some modules use 4 space symbols instead of 1 tab symbol. Sorry if I am wrong.
A proper error handling IMO is to return an error to the caller instead of terminating the app.
Can you give an example? The Start utility already uses ExitProcess() if you means this...
Anatoly Lyutin wrote:
Dmitry Timoshkov wrote:
"Anatoly Lyutin" vostok@etersoft.ru wrote:
The whole Wine tree uses 8 spaces for a tab.
Hm. I thought that some modules use 4 space symbols instead of 1 tab symbol. Sorry if I am wrong.
I think you are confusing indentation level with the amount of space a tab is. - Indentation level in Wine can be 4 (preferred), 8, 2 or even something odd like 3. - A tab is always 8 spaces.
A proper error handling IMO is to return an error to the caller instead of terminating the app.
Can you give an example? The Start utility already uses ExitProcess() if you means this...
bye michael
Michael Stefaniuc wrote:
Anatoly Lyutin wrote:
Dmitry Timoshkov wrote:
"Anatoly Lyutin" vostok@etersoft.ru wrote:
The whole Wine tree uses 8 spaces for a tab.
Hm. I thought that some modules use 4 space symbols instead of 1 tab symbol. Sorry if I am wrong.
I think you are confusing indentation level with the amount of space a tab is.
- Indentation level in Wine can be 4 (preferred), 8, 2 or even something
odd like 3.
- A tab is always 8 spaces.
Yes, Thanks a lot. It is clear for me now.
A proper error handling IMO is to return an error to the caller instead of terminating the app.
Can you give an example? The Start utility already uses ExitProcess() if you means this...
bye michael