http://bugs.winehq.org/show_bug.cgi?id=11848
Summary: Adobe Acrobat Pro 7 -- Clipboard Viewer does not work Product: Wine Version: 0.9.56. Platform: Other OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: jens@porup.com
Selecting Window --> Clipboard Viewer produces a pop up message that says:
Could not launch the clipboard.
http://bugs.winehq.org/show_bug.cgi?id=11848
foobard jens@porup.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Adobe Acrobat Pro 7 -- |Adobe Acrobat Pro 6 -- |Clipboard Viewer does not |Clipboard Viewer does not |work |work
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #1 from foobard jens@porup.com 2008-03-11 20:22:17 --- confirm bug still present in wine 0.9.57
http://bugs.winehq.org/show_bug.cgi?id=11848
foobard jens@porup.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|0.9.56. |0.9.57.
http://bugs.winehq.org/show_bug.cgi?id=11848
James Hawkins truiken@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|0.9.57. |0.9.56.
--- Comment #2 from James Hawkins truiken@gmail.com 2008-03-13 16:37:20 --- Don't change the original reported version.
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #3 from foobard jens@porup.com 2008-03-23 10:22:30 --- confirm still present in wine 0.9.58
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #4 from foobard jens@porup.com 2008-04-08 21:24:24 --- confirm still present in wine 0.9.59
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #5 from foobard jens@porup.com 2008-04-15 14:23:39 --- Created an attachment (id=12212) --> (http://bugs.winehq.org/attachment.cgi?id=12212) windows screenshot of Acrobat clipboard
Here's a screenshot of what the Acrobat clipboard viewer looks like in Windows.
I had an unexpected and rather bizarre experience taking the screenshot -- hitting Alt-PrtScrn repeatedly caused the captured image to be recursively (and immediately) pasted into Acrobat Pro's clipboard.
Uneducated guess -- Acrobat Pro 6 is working directly with the Windows clipboard. It's the only thing I can think of that would explain this odd behaviour.
http://bugs.winehq.org/show_bug.cgi?id=11848
foobard jens@porup.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Adobe Acrobat Pro 6 -- |Adobe Acrobat Pro 6 / |Clipboard Viewer does not |Acrobat Reader 6.01 -- |work |Clipboard Viewer does not | |work
--- Comment #6 from foobard jens@porup.com 2008-04-22 12:19:11 --- Identical bug in Acrobat Reader 6.01.
http://bugs.winehq.org/show_bug.cgi?id=11848
foobard jens@porup.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Adobe Acrobat Pro 6 / |Adobe Acrobat Pro 6 & 7 / |Acrobat Reader 6.01 -- |Acrobat Reader 6 & 7 -- |Clipboard Viewer does not |Clipboard Viewer does not |work |work
--- Comment #7 from foobard jens@porup.com 2008-05-09 22:06:48 --- Identical bug in both Acrobat Pro 7 and Acrobat Reader 7.
http://bugs.winehq.org/show_bug.cgi?id=11848
foobard jens@porup.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends on| |13555
http://bugs.winehq.org/show_bug.cgi?id=11848
Lei Zhang thestig@google.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #8 from Lei Zhang thestig@google.com 2008-07-28 16:27:18 --- Confirming with Wine 1.1.2 and Acrobat Reader 6.01.
http://bugs.winehq.org/show_bug.cgi?id=11848
Detlef Riekenberg wine.dev@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |enhancement Component|-unknown |programs Summary|Adobe Acrobat Pro 6 & 7 / |Provide a Cipboard Viever |Acrobat Reader 6 & 7 -- |replacement (clipbrd.exe) |Clipboard Viewer does not |used by Adobe Acrobat Pro 6 |work |& 7 / Acrobat Reader 3 - 7
--- Comment #9 from Detlef Riekenberg wine.dev@web.de 2009-01-06 08:53:47 --- Wine has no replacement for the Windows Clipboard Viewer yet.
With my patch for nddeapi.dll, clipbrd.exe from XP works in Wine. ( http://www.winehq.org/pipermail/wine-patches/2009-January/067103.html )
http://bugs.winehq.org/show_bug.cgi?id=11848
Detlef Riekenberg wine.dev@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Provide a Cipboard Viever |Provide a Cipboard Viewer |replacement (clipbrd.exe) |replacement (clipbrd.exe) |used by Adobe Acrobat Pro 6 |used by Adobe Acrobat Pro 6 |& 7 / Acrobat Reader 3 - 7 |& 7 / Acrobat Reader 3 - 7
http://bugs.winehq.org/show_bug.cgi?id=11848
Detlef Riekenberg wine.dev@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends on|13555 |
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #10 from Johan Dahlin jdahlin@async.com.br 2009-01-08 06:24:11 --- Alexandre says that wine should include a clipbrd.exe instead of stubbing nddeapi.dll.
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #11 from Austin English austinenglish@gmail.com 2009-07-08 15:46:32 --- (In reply to comment #10)
Alexandre says that wine should include a clipbrd.exe instead of stubbing nddeapi.dll.
FWIW, there are a few freeware versions around. Here's one I found: http://locate32.net/content/view/19/32/
the website has other open source programs on there (though, no license?). I've e-mailed the author to clarify the license and see if Clipboard Viewer X can be open source/LPGL'ed (or give wine permission). Stripping it down for wine from there should be pretty easy.
http://bugs.winehq.org/show_bug.cgi?id=11848
Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alexander.scott.johns+wineb | |ug@googlemail.com
http://bugs.winehq.org/show_bug.cgi?id=11848
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
--- Comment #12 from Austin English austinenglish@gmail.com 2009-07-20 16:24:00 --- (In reply to comment #11)
(In reply to comment #10)
Alexandre says that wine should include a clipbrd.exe instead of stubbing nddeapi.dll.
FWIW, there are a few freeware versions around. Here's one I found: http://locate32.net/content/view/19/32/
the website has other open source programs on there (though, no license?). I've e-mailed the author to clarify the license and see if Clipboard Viewer X can be open source/LPGL'ed (or give wine permission). Stripping it down for wine from there should be pretty easy.
For anyone interested, the author has sent me the source code for it, with permission for Wine to use it as LGPL.
If anyone would like a good weekend/start project, this would be good. Send me an e-mail.
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #13 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2009-07-22 03:39:41 --- (In reply to comment #12) [snip]
For anyone interested, the author has sent me the source code for it, with permission for Wine to use it as LGPL.
If anyone would like a good weekend/start project, this would be good. Send me an e-mail.
I'm interested in this; Austin, could you email me the code, please?
And can someone change "Cipboard" to "Clipboard" in the bug title?
http://bugs.winehq.org/show_bug.cgi?id=11848
Jeff Zaroyko jeffz@jeffz.name changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source Summary|Provide a Cipboard Viewer |Provide a Clipboard Viewer |replacement (clipbrd.exe) |replacement (clipbrd.exe) |used by Adobe Acrobat Pro 6 |used by Adobe Acrobat Pro 6 |& 7 / Acrobat Reader 3 - 7 |& 7 / Acrobat Reader 3 - 7
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #14 from Austin English austinenglish@gmail.com 2009-07-22 12:29:05 --- (In reply to comment #13)
(In reply to comment #12) [snip]
For anyone interested, the author has sent me the source code for it, with permission for Wine to use it as LGPL.
If anyone would like a good weekend/start project, this would be good. Send me an e-mail.
I'm interested in this; Austin, could you email me the code, please?
And can someone change "Cipboard" to "Clipboard" in the bug title?
Sent.
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #15 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2009-07-24 20:32:08 --- Created an attachment (id=22596) --> (http://bugs.winehq.org/attachment.cgi?id=22596) Visual C++ Express project (Yes, I know... I hadn't used Windows for 2 months...)
Clipboard Viewer X is written in C++, and so can't be used directly. But the library it uses looks like a layer over the Windows API.
I have created my own clipboard viewer, which (currently) can get the list of available formats and clear the clipboard... and that's about it. I haven't looked at the Clipboard Viewer X code closely yet.
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #16 from Austin English austinenglish@gmail.com 2009-07-24 21:57:43 --- (In reply to comment #15)
Created an attachment (id=22596)
--> (http://bugs.winehq.org/attachment.cgi?id=22596) [details]
Visual C++ Express project (Yes, I know... I hadn't used Windows for 2 months...)
Clipboard Viewer X is written in C++, and so can't be used directly. But the library it uses looks like a layer over the Windows API.
I have created my own clipboard viewer, which (currently) can get the list of available formats and clear the clipboard... and that's about it. I haven't looked at the Clipboard Viewer X code closely yet.
Excellent work. Keep in mind, if you're going to put it in wine, you should get it to compile with gcc. Bonus points if you can get it to compile under mingw as well :-).
http://bugs.winehq.org/show_bug.cgi?id=11848
Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #22596|0 |1 is obsolete| |
--- Comment #17 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2009-07-26 19:40:25 --- Created an attachment (id=22635) --> (http://bugs.winehq.org/attachment.cgi?id=22635) Visual C++ Express project + compiled .exe
My clipboard viewer can now display the CF_TEXT, CF_UNICODETEXT, CF_OEMTEXT and CF_DSPTEXT formats. Since I am running Windows, I can't test it in Wine (i.e.: I can't be bothered to boot into Linux). Could someone test if it works properly in Wine? Note: it should automatically update whenever the clipboard changes.
Known problems: - only supports plain text - rubbish font is used - 'clips' (files which store the state of the clipboard at a particular time) are not implemented
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #18 from Austin English austinenglish@gmail.com 2009-07-27 21:58:13 --- (In reply to comment #17)
Created an attachment (id=22635)
--> (http://bugs.winehq.org/attachment.cgi?id=22635) [details]
Visual C++ Express project + compiled .exe
My clipboard viewer can now display the CF_TEXT, CF_UNICODETEXT, CF_OEMTEXT and CF_DSPTEXT formats. Since I am running Windows, I can't test it in Wine (i.e.: I can't be bothered to boot into Linux). Could someone test if it works properly in Wine? Note: it should automatically update whenever the clipboard changes.
Known problems:
- only supports plain text
- rubbish font is used
- 'clips' (files which store the state of the clipboard at a particular time)
are not implemented
Depends on MSVCR80.dll, which obviously won't work in stock wine. It does run after installing that with winetricks.
http://bugs.winehq.org/show_bug.cgi?id=11848
Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #22635|0 |1 is obsolete| |
--- Comment #19 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2009-07-28 13:04:47 --- Created an attachment (id=22664) --> (http://bugs.winehq.org/attachment.cgi?id=22664) Visual C++ Express project
I've added the ability to display the clipboard contents in different ways (currently, plain text and hex). I've also managed to compile it with wxDev-C++, and will attach the .exe as a separate attachment.
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #20 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2009-07-28 13:07:08 --- Created an attachment (id=22665) --> (http://bugs.winehq.org/attachment.cgi?id=22665) clipview compiled with wxDev-C++
This shouldn't depend on MSVCR80.dll.
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #21 from Vitaliy Margolen vitaliy@kievinfo.com 2009-07-28 19:38:57 --- I'm not sure what part of Wine not accepting anything other then code written in "c" you missed. Please stop. This is not your personal development site. When you have a working program _entirely_ written in C, you are welcome to submit it to wine-patches. Until them please do not post anymore of these msvc projects here.
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #22 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2009-07-28 20:20:14 --- (In reply to comment #21)
I'm not sure what part of Wine not accepting anything other then code written in "c" you missed. Please stop. This is not your personal development site. When you have a working program _entirely_ written in C, you are welcome to submit it to wine-patches. Until them please do not post anymore of these msvc projects here.
It is C (I'm just compiling it as C++ for the moment, since it has slightly stronger typechecking).
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #23 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2009-07-28 20:25:15 --- (In reply to comment #22)
(In reply to comment #21)
I'm not sure what part of Wine not accepting anything other then code written in "c" you missed. Please stop. This is not your personal development site. When you have a working program _entirely_ written in C, you are welcome to submit it to wine-patches. Until them please do not post anymore of these msvc projects here.
It is C (I'm just compiling it as C++ for the moment, since it has slightly stronger typechecking).
PS: is there an easy way to use a DIALOG(EX) resource as an MDI child? I'm trying to add an Information window, which has a listview and a few statics on it.
http://bugs.winehq.org/show_bug.cgi?id=11848
Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #22664|0 |1 is obsolete| |
--- Comment #24 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2009-08-05 14:13:13 --- Created an attachment (id=22835) --> (http://bugs.winehq.org/attachment.cgi?id=22835) Patch that implements a clipboard viewer
My clipboard viewer can now preview several clipboard formats, and there are several different views.
The formats which should work include CF_TEXT, CF_BITMAP, CF_METAFILEPICT, CF_OEMTEXT, CF_DIB, CF_PALETTE, CF_UNICODETEXT, CF_ENHMETAFILE, CF_HDROP, CF_LOCALE, CF_DIBV5, CF_DSPTEXT, CF_DSPBITMAP, CF_DSPMETAFILEPICT, CF_DSPENHMETAFILE, "Rich Text Format", "RTF As Text" and "RTF in UTF8".
How similar to the Windows Clipboard Viewer (or Clipbook Viewer) should mine be? - My program saves the state of the clipboard when it refreshes, but native just opens the clipboard when it redraws (but if the automatic updates break, it doesn't work well). My program uses the EDIT and Richedit controls, which store the state anyway. - My program can display multiple formats at once; native only displays one. - My program is more programmer-oriented (and so displays the format id with the format name, and has an Information window). - My program can display the raw clipboard data in hex. - The clipboard viewer was removed from Vista.
http://bugs.winehq.org/show_bug.cgi?id=11848
Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #22835|text/plain |application/octet-stream mime type| | Attachment #22835|1 |0 is patch| |
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #25 from Austin English austinenglish@gmail.com 2009-08-05 14:17:39 --- (In reply to comment #24)
Created an attachment (id=22835)
--> (http://bugs.winehq.org/attachment.cgi?id=22835) [details]
Patch that implements a clipboard viewer
My clipboard viewer can now preview several clipboard formats, and there are several different views.
The formats which should work include CF_TEXT, CF_BITMAP, CF_METAFILEPICT, CF_OEMTEXT, CF_DIB, CF_PALETTE, CF_UNICODETEXT, CF_ENHMETAFILE, CF_HDROP, CF_LOCALE, CF_DIBV5, CF_DSPTEXT, CF_DSPBITMAP, CF_DSPMETAFILEPICT, CF_DSPENHMETAFILE, "Rich Text Format", "RTF As Text" and "RTF in UTF8".
Great!
How similar to the Windows Clipboard Viewer (or Clipbook Viewer) should mine be?
That's a better question for Julliard. Best to ask him before putting too much work into the wrong direction
- My program saves the state of the clipboard when it refreshes, but native
just opens the clipboard when it redraws (but if the automatic updates break, it doesn't work well). My program uses the EDIT and Richedit controls, which store the state anyway.
- My program can display multiple formats at once; native only displays one.
- My program is more programmer-oriented (and so displays the format id with
the format name, and has an Information window).
- My program can display the raw clipboard data in hex.
- The clipboard viewer was removed from Vista.
Older programs still use it. XP is still the default wine setting, and probably will be for a while. Oleview/etc. are no longer around on newer windows versions, but we still bundle them.
http://bugs.winehq.org/show_bug.cgi?id=11848
Ken Sharp kennybobs@o2.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=11848
Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #22835|0 |1 is obsolete| |
--- Comment #26 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2009-10-07 09:03:08 --- Created an attachment (id=23968) --> (http://bugs.winehq.org/attachment.cgi?id=23968) Current progress. Includes the nddapi patch.
I'm going to try and make my viewer more like the WinNT clipbrd.exe, but I don't have access to a pre-WinXP-SP2 version - SP2 disabled several features, and no matter what I do (start the ClipBook service, etc), I can't get them back.
(In reply to comment #9)
Wine has no replacement for the Windows Clipboard Viewer yet.
With my patch for nddeapi.dll, clipbrd.exe from XP works in Wine. ( http://www.winehq.org/pipermail/wine-patches/2009-January/067103.html )
-- By by ... Detlef
I tried this patch (and have included it in the attachment, sans \r\n line endings), but it doesn't seem to work: running 'wine clipbrd' (with the WinXP version) just exits without any output.
http://bugs.winehq.org/show_bug.cgi?id=11848
Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #22665|0 |1 is obsolete| | Attachment #23968|0 |1 is obsolete| |
--- Comment #27 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2010-01-20 13:18:31 --- Created an attachment (id=25813) --> (http://bugs.winehq.org/attachment.cgi?id=25813) New version of clipboard viewer patches
I've now put LGPL headers in all the files.
http://bugs.winehq.org/show_bug.cgi?id=11848
Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #25813|0 |1 is obsolete| |
--- Comment #28 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2010-01-29 21:04:43 --- Created an attachment (id=25952) --> (http://bugs.winehq.org/attachment.cgi?id=25952) New version of clipboard viewer, as one uncompressed patch
Sorry for repeatedly spamming this bug.
This version now has one Clipboard window, like the real clipbrd. Now *every* file has an LGPL header (unlike the previous attachment).
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #29 from Jeff Zaroyko jeffz@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.
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #30 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2010-01-29 21:57:08 --- (In reply to comment #29)
(In reply to comment #28)
Created an attachment (id=25952)
--> (http://bugs.winehq.org/attachment.cgi?id=25952) [details] [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.
All the C++ comments are notes-to-self, and will be removed once I've worked out the correct behaviour.
+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:
{ type1 var1 = expr1; /* decl */ type2 var2 = expr2; /* decl */ stmt1; stmt2; ... }
Thanks for the comments.
PS How do you get the correct dimensions of an EMF? And the correct DC to draw it in?
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #31 from Jeff Zaroyko jeffz@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."
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #32 from Alexandre Julliard julliard@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...)
http://bugs.winehq.org/show_bug.cgi?id=11848
Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #25952|0 |1 is obsolete| |
--- Comment #33 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2010-06-16 04:31:28 --- Created an attachment (id=28879) --> (http://bugs.winehq.org/attachment.cgi?id=28879) New version of the clipboard viewer. Applies on wine-1.2-rc3 or above.
I've updated my clipboard viewer to use the new _s functions in msvcrt, along with a few other changes.
http://bugs.winehq.org/show_bug.cgi?id=11848
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #34 from Dan Kegel dank@kegel.com 2010-06-16 06:58:21 --- The include/msvcrt/stdio.h changes belong in a separate patch?
Have you sent this to wine-patches yet?
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #35 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2010-06-16 08:57:17 --- (In reply to comment #34)
The include/msvcrt/stdio.h changes belong in a separate patch?
Yes, but I've not finished it yet. Keeping it as one patch makes it easier to change. I might send the msvcrt changes, though.
Have you sent this to wine-patches yet?
Not yet, no.
It behaves differently to native in places (e.g. mine has a hex view; mine uses an EDIT control for text view but native uses some custom control; mine can preview RTF, Locale, and any text-based format; mine cannot view the owner-drawn format; mine cannot open or save clips; native has a 'Clipbook' and the ability to share clipboards over NetDDE; mine has an Information window, giving the clipboard owner, etc; mine allows you to override how to view any particular format; mine has a refresh option which actually works, and you can toggle auto-refresh).
It's also getting close to release -- adding this will mess up your translation statistics!
http://bugs.winehq.org/show_bug.cgi?id=11848
Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #28879|0 |1 is obsolete| |
--- Comment #36 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2010-06-17 13:50:05 --- Created an attachment (id=28920) --> (http://bugs.winehq.org/attachment.cgi?id=28920) New version of the clipboard viewer. Applies on wine-1.2-rc3-102-g5361263 or above.
(In reply to comment #34)
The include/msvcrt/stdio.h changes belong in a separate patch?
These changes have now been applied (along with a few others) as http://source.winehq.org/git/wine.git/?a=commitdiff;h=5361263bdbc95b33e9c99f...
http://bugs.winehq.org/show_bug.cgi?id=11848
butraxz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |butraxz@gmail.com
--- Comment #37 from butraxz@gmail.com 2012-05-17 15:22:59 CDT --- This bug has not been updated for two years. Is this still an issue i current (1.5.4) or newer wine ?
http://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #38 from Austin English austinenglish@gmail.com 2012-05-17 15:25:58 CDT --- (In reply to comment #37)
This bug has not been updated for two years. Is this still an issue i current (1.5.4) or newer wine ?
Please, when you can check the bug yourself, do so.
Yes, it's still an issue, check the wine source, there is not clipbrd.exe.
https://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #39 from Austin English austinenglish@gmail.com --- Still present in 1.7.23.
https://bugs.winehq.org/show_bug.cgi?id=11848
zippy gohabsgo60@yahoo.ca changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gohabsgo60@yahoo.ca
https://bugs.winehq.org/show_bug.cgi?id=11848
jpleonard12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jpleonard12@gmail.com
--- Comment #40 from jpleonard12@gmail.com --- Confirmed that bug is still present in Adobe Acrobat Professional 6.0, with Wine v7.0.rc4. Selecting Window->ClipboardViewer causes popup 'Could Not Launch the Clipboard'
https://bugs.winehq.org/show_bug.cgi?id=11848
--- Comment #41 from jpleonard12@gmail.com --- Created attachment 71538 --> https://bugs.winehq.org/attachment.cgi?id=71538 Screenshot of bug with Wine v7.0.rc4
https://bugs.winehq.org/show_bug.cgi?id=11848
t.bussmann@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |t.bussmann@gmx.net
https://bugs.winehq.org/show_bug.cgi?id=11848
Neko-san nekoNexus@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nekoNexus@protonmail.ch