http://bugs.winehq.org/show_bug.cgi?id=11848 --- Comment #29 from Jeff Zaroyko <jeffz(a)jeffz.name> 2010-01-29 21:29:39 --- (In reply to comment #28)
Created an attachment (id=25952) --> (http://bugs.winehq.org/attachment.cgi?id=25952) [details] New version of clipboard viewer, as one uncompressed patch
At a glance here is some general feedback without taking too close a look at what the code actually does. + // latin1 for now + // Formats are commented out if other, better formats are synthesized + // from them, or the format is broken in Wine. You'll want to drop the C99 or C++ style comments. +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. +// && globals.actual_viewmode == VIEWMODE_IMAGE) Why is this code commented out? If it's not needed, don't include it. + ((LOGPALETTE*)plp)->palVersion = 0xdead; // todo + hDC = GetDC(NULL); // Use a better DC get_image_dimensions also has a large section of code commented out, if it's not meant to be there, you should remove it. + // It would be nice to actually draw a representation of OBJ_PAL. C99 / C++ comments not allowed. + static const WCHAR type_fmt[] = { + 't','y','p','e','=','%','u',0 + }; + static const WCHAR err_fmt[] = { + 'e','r','r','=','%','u',0 + }; You could do this in 2 lines instead of 6. + DWORD err = GetLastError(); + WCHAR buffer[MAX_STRING_LEN]; Mixing code and declarations again. C99 / C++ comments... +// Better name: get_image_boundary? get_image_extent? +/* In the MDI child's client coordinates. */ + DWORD error = GetLastError(); + int stage_len = LoadStringW(globals.hInst, stage_id, out, out_len - 2); Mixing code and declarations again, not allowed. +static void clipview_refresh(void) +{ + HMENU hMenu = GetMenu(globals.hFrameWnd); + HMENU hViewMenu = globals.hViewMenu; mixing code and declarations again, not allowed. -- 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.