[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
Sat Jan 30 03:46:41 CST 2010


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





--- Comment #32 from Alexandre Julliard <julliard at winehq.org>  2010-01-30 03:46:40 ---
(In reply to comment #31)
> (In reply to comment #30) 
> > > +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.

You are confusing this with static variables. The above code is just fine
(well, except for the ugly HALLOC macro and the size typecast, but these are
different issues...)

-- 
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