[Bug 11848] Provide a Clipboard Viewer replacement (clipbrd.exe) used by Adobe Acrobat Pro 6 & 7 / Acrobat Reader 3 - 7

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Jan 29 22:15:25 CST 2010


http://bugs.winehq.org/show_bug.cgi?id=11848





--- Comment #31 from Jeff Zaroyko <jeffz at jeffz.name>  2010-01-29 22:15:25 ---
(In reply to comment #30) 
> > You'll want to drop the C99 or C++ style comments.
> 
> All the C++ comments are notes-to-self, and will be removed once I've worked
> out the correct behaviour.

ok, but if you'd like anyone to review it it's best to match what is expected
for Wine.

> > 
> > +static WCHAR* heap_MBtoWCZ(UINT codepage, LPCSTR src, SIZE_T size_src)
> > +{
> > +    int len = MultiByteToWideChar(codepage, 0, src, (int) size_src, NULL, 0);
> > +    WCHAR* dest = HALLOC(len+1, WCHAR);
> > 
> > Mixing code and declarations, this is C99 or C++, for Wine you will need
> > to put the declarations at the start of a block followed by code.
> 
> I thought C89 allowed you to do:

It does, but that's not what you're doing.  Those expressions can only be
constant-expressions, which is the type of expression used in an initializer,
where the issue is that you are giving a non-constant expression in an
initializer.

Referring to K&R 2nd Ed (ANSI C):
"Constant expressions may not contain assignments, increment or decrement
operators, function calls, or comma operators, except in an operand of sizeof"
"Expressions that evaluate to a constant are required in several contexts,
after case, as array bounds and bit-field lengths, as the value for an enum
constant in initializers and in certain preprocessor expressions."

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list