Hugh McMaster hugh.mcmaster@outlook.com writes:
+static void __cdecl output_array(const WCHAR *fmt, ...) +{
- __ms_va_list va_args;
- __ms_va_start(va_args, fmt);
- output_formatstring(fmt, va_args);
- __ms_va_end(va_args);
}
That's a strange name, why "array"?
On Monday, 8 February 2016 20:06:55 +0900, Alexandre Julliard wrote:
Hugh McMaster writes:
+static void __cdecl output_array(const WCHAR *fmt, ...) +{
- __ms_va_list va_args;
- __ms_va_start(va_args, fmt);
- output_formatstring(fmt, va_args);
- __ms_va_end(va_args);
}
That's a strange name, why "array"?
Well, we use array syntax for string literals. So it's just for differentiating between string resources (as messages) and string literals (as arrays).
I also used the name in http://source.winehq.org/git/wine.git/commitdiff/4335c464c358d15024e76c918ef... and it slipped past back then! :-)
I'm happy to change the function name if you have something else in mind.
-- Hugh McMaster
Hugh McMaster hugh.mcmaster@outlook.com writes:
On Monday, 8 February 2016 20:06:55 +0900, Alexandre Julliard wrote:
Hugh McMaster writes:
+static void __cdecl output_array(const WCHAR *fmt, ...) +{
- __ms_va_list va_args;
- __ms_va_start(va_args, fmt);
- output_formatstring(fmt, va_args);
- __ms_va_end(va_args);
}
That's a strange name, why "array"?
Well, we use array syntax for string literals. So it's just for differentiating between string resources (as messages) and string literals (as arrays).
I also used the name in http://source.winehq.org/git/wine.git/commitdiff/4335c464c358d15024e76c918ef... and it slipped past back then! :-)
Right, I probably assumed that you meant the uninstalled programs array back then, not the string. Of course technically strings are also arrays, but that's a confusing name. Just name it output_string or something like that.
On Mon, 8 Feb 2016 22:12:05 +0900, Alexandre Julliard wrote:
Hugh McMaster writes:
On Monday, 8 February 2016 20:06:55 +0900, Alexandre Julliard wrote:
Hugh McMaster writes:
+static void __cdecl output_array(const WCHAR *fmt, ...) +{
- __ms_va_list va_args;
- __ms_va_start(va_args, fmt);
- output_formatstring(fmt, va_args);
- __ms_va_end(va_args);
}
That's a strange name, why "array"?
Well, we use array syntax for string literals. So it's just for differentiating between string resources (as messages) and string literals (as arrays).
I also used the name in http://source.winehq.org/git/wine.git/commitdiff/4335c464c358d15024e76c918ef... and it slipped past back then! :-)
Right, I probably assumed that you meant the uninstalled programs array back then, not the string. Of course technically strings are also arrays, but that's a confusing name. Just name it output_string or something like that.
I considered output_string, but I thought it might cause confusion. Consider this:
output_message(STRING_INVALID_KEY); // message as resource string output_string(pointer to some array of WCHAR, ...) // we pass in a pointer. Why don't we do output_string(STRING_INVALID_KEY)?
So the reference to a string in the function name and in the resource identifier could cause confusion because it looks as though they should be related. Or that's my reading of it, at least.
Is either output_arraystr or output_strarray suitable?
Hugh McMaster hugh.mcmaster@outlook.com writes:
I considered output_string, but I thought it might cause confusion. Consider this:
output_message(STRING_INVALID_KEY); // message as resource string output_string(pointer to some array of WCHAR, ...) // we pass in a pointer. Why don't we do output_string(STRING_INVALID_KEY)?
So the reference to a string in the function name and in the resource identifier could cause confusion because it looks as though they should be related. Or that's my reading of it, at least.
Is either output_arraystr or output_strarray suitable?
Now it feels like it will output an array of strings...