Jacek Caban : winemac: Don't share debugstr_format between dragdrop.c and clipboard.c.
Alexandre Julliard
julliard at winehq.org
Thu Jun 2 16:26:09 CDT 2022
Module: wine
Branch: master
Commit: 469a2ce5cca42e1519736de3b150cb774673730d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=469a2ce5cca42e1519736de3b150cb774673730d
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri May 27 00:41:50 2022 +0200
winemac: Don't share debugstr_format between dragdrop.c and clipboard.c.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
---
dlls/winemac.drv/clipboard.c | 2 +-
dlls/winemac.drv/dragdrop.c | 40 ++++++++++++++++++++++++++++++++++++++++
dlls/winemac.drv/macdrv.h | 1 -
3 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/dlls/winemac.drv/clipboard.c b/dlls/winemac.drv/clipboard.c
index 16eff401a98..16c44ddfde6 100644
--- a/dlls/winemac.drv/clipboard.c
+++ b/dlls/winemac.drv/clipboard.c
@@ -210,7 +210,7 @@ static unsigned int nb_current_mac_formats;
/**************************************************************************
* debugstr_format
*/
-const char *debugstr_format(UINT id)
+static const char *debugstr_format(UINT id)
{
WCHAR buffer[256];
diff --git a/dlls/winemac.drv/dragdrop.c b/dlls/winemac.drv/dragdrop.c
index d5de2abb37a..19a5c4794b5 100644
--- a/dlls/winemac.drv/dragdrop.c
+++ b/dlls/winemac.drv/dragdrop.c
@@ -46,6 +46,46 @@ typedef struct
} DragDropDataObject;
+/**************************************************************************
+ * debugstr_format
+ */
+static const char *debugstr_format(UINT id)
+{
+ WCHAR buffer[256];
+
+ if (GetClipboardFormatNameW(id, buffer, 256))
+ return wine_dbg_sprintf("0x%04x %s", id, debugstr_w(buffer));
+
+ switch (id)
+ {
+#define BUILTIN(id) case id: return #id;
+ BUILTIN(CF_TEXT)
+ BUILTIN(CF_BITMAP)
+ BUILTIN(CF_METAFILEPICT)
+ BUILTIN(CF_SYLK)
+ BUILTIN(CF_DIF)
+ BUILTIN(CF_TIFF)
+ BUILTIN(CF_OEMTEXT)
+ BUILTIN(CF_DIB)
+ BUILTIN(CF_PALETTE)
+ BUILTIN(CF_PENDATA)
+ BUILTIN(CF_RIFF)
+ BUILTIN(CF_WAVE)
+ BUILTIN(CF_UNICODETEXT)
+ BUILTIN(CF_ENHMETAFILE)
+ BUILTIN(CF_HDROP)
+ BUILTIN(CF_LOCALE)
+ BUILTIN(CF_DIBV5)
+ BUILTIN(CF_OWNERDISPLAY)
+ BUILTIN(CF_DSPTEXT)
+ BUILTIN(CF_DSPBITMAP)
+ BUILTIN(CF_DSPMETAFILEPICT)
+ BUILTIN(CF_DSPENHMETAFILE)
+#undef BUILTIN
+ default: return wine_dbg_sprintf("0x%04x", id);
+ }
+}
+
static inline DragDropDataObject *impl_from_IDataObject(IDataObject *iface)
{
return CONTAINING_RECORD(iface, DragDropDataObject, IDataObject_iface);
diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h
index c0f2811c5f5..401ebab3bcc 100644
--- a/dlls/winemac.drv/macdrv.h
+++ b/dlls/winemac.drv/macdrv.h
@@ -255,7 +255,6 @@ extern void macdrv_displays_changed(const macdrv_event *event) DECLSPEC_HIDDEN;
extern void macdrv_UpdateClipboard(void) DECLSPEC_HIDDEN;
extern BOOL query_pasteboard_data(HWND hwnd, CFStringRef type) DECLSPEC_HIDDEN;
extern void macdrv_lost_pasteboard_ownership(HWND hwnd) DECLSPEC_HIDDEN;
-extern const char *debugstr_format(UINT id) DECLSPEC_HIDDEN;
extern HANDLE macdrv_get_pasteboard_data(CFTypeRef pasteboard, UINT desired_format) DECLSPEC_HIDDEN;
extern BOOL macdrv_pasteboard_has_format(CFTypeRef pasteboard, UINT desired_format) DECLSPEC_HIDDEN;
extern UINT* macdrv_get_pasteboard_formats(CFTypeRef pasteboard, UINT* num_formats) DECLSPEC_HIDDEN;
More information about the wine-cvs
mailing list