From 54b6a42a0a55b96048d34b1891e6d00e0ebf8f69 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Tue, 6 Jan 2009 00:09:48 +0100 Subject: [PATCH] include: Change twain.h to use LONG/ULONG for Win64 compatibility. Also fix the compiler warnings introduced by this change. --- dlls/gphoto2.ds/capability.c | 6 +++--- dlls/gphoto2.ds/gphoto2_main.c | 6 +++--- dlls/sane.ds/sane_main.c | 2 +- dlls/twain_32/twain32_main.c | 6 +++--- include/twain.h | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dlls/gphoto2.ds/capability.c b/dlls/gphoto2.ds/capability.c index 754e58dd6a8..378ef2a0358 100644 --- a/dlls/gphoto2.ds/capability.c +++ b/dlls/gphoto2.ds/capability.c @@ -195,7 +195,7 @@ static TW_BOOL GPHOTO2_OneValueSet32 (pTW_CAPABILITY pCapability, TW_UINT32 valu { pCapability->hContainer = GlobalAlloc (0, sizeof(TW_ONEVALUE)); - TRACE("-> %ld\n", value); + TRACE("-> %d\n", value); if (pCapability->hContainer) { @@ -258,7 +258,7 @@ static TW_BOOL GPHOTO2_EnumGet16 (pTW_CAPABILITY pCapability, int *nrofvalues, T *nrofvalues = pVal->NumItems; *values = HeapAlloc( GetProcessHeap(), 0, sizeof(TW_UINT16)*pVal->NumItems); memcpy (*values, pVal->ItemList, sizeof(TW_UINT16)*(*nrofvalues)); - FIXME("Current Index %ld, Default Index %ld\n", pVal->CurrentIndex, pVal->DefaultIndex); + FIXME("Current Index %d, Default Index %d\n", pVal->CurrentIndex, pVal->DefaultIndex); GlobalUnlock (pCapability->hContainer); return TRUE; } @@ -310,7 +310,7 @@ static TW_UINT16 GPHOTO2_ICAPXferMech (pTW_CAPABILITY pCapability, TW_UINT16 act if (!GPHOTO2_OneValueGet32 (pCapability, &xfermechtemp)) return TWCC_LOWMEMORY; activeDS.capXferMech = xfermechtemp; - TRACE("xfermech is %ld\n", xfermechtemp); + TRACE("xfermech is %d\n", xfermechtemp); return TWCC_SUCCESS; } else if (pCapability->ConType == TWON_ENUMERATION) diff --git a/dlls/gphoto2.ds/gphoto2_main.c b/dlls/gphoto2.ds/gphoto2_main.c index 8cf1f9dadf6..311abb84a15 100644 --- a/dlls/gphoto2.ds/gphoto2_main.c +++ b/dlls/gphoto2.ds/gphoto2_main.c @@ -343,7 +343,7 @@ static TW_UINT16 GPHOTO2_PendingXfersEndXfer (pTW_IDENTITY pOrigin, if (file->download) count++; } - TRACE("count = %ld\n", count); + TRACE("count = %d\n", count); pPendingXfers->Count = count; if (pPendingXfers->Count != 0) { activeDS.currentState = 6; @@ -379,7 +379,7 @@ static TW_UINT16 GPHOTO2_PendingXfersGet (pTW_IDENTITY pOrigin, if (file->download) count++; } - TRACE("count = %ld\n", count); + TRACE("count = %d\n", count); pPendingXfers->Count = count; activeDS.twCC = TWCC_SUCCESS; return TWRC_SUCCESS; @@ -1002,7 +1002,7 @@ DS_Entry ( pTW_IDENTITY pOrigin, { TW_UINT16 twRC = TWRC_SUCCESS; /* Return Code */ - TRACE("(DG=%ld DAT=%d MSG=%d)\n", DG, DAT, MSG); + TRACE("(DG=%d DAT=%d MSG=%d)\n", DG, DAT, MSG); switch (DG) { diff --git a/dlls/sane.ds/sane_main.c b/dlls/sane.ds/sane_main.c index ea1af0ea15e..468df3b55fd 100644 --- a/dlls/sane.ds/sane_main.c +++ b/dlls/sane.ds/sane_main.c @@ -543,7 +543,7 @@ DS_Entry ( pTW_IDENTITY pOrigin, { TW_UINT16 twRC = TWRC_SUCCESS; /* Return Code */ - TRACE("(DG=%ld DAT=%d MSG=%d)\n", DG, DAT, MSG); + TRACE("(DG=%d DAT=%d MSG=%d)\n", DG, DAT, MSG); switch (DG) { diff --git a/dlls/twain_32/twain32_main.c b/dlls/twain_32/twain32_main.c index 3239ec57e68..9eb27547f14 100644 --- a/dlls/twain_32/twain32_main.c +++ b/dlls/twain_32/twain32_main.c @@ -159,7 +159,7 @@ DSM_Entry (pTW_IDENTITY pOrigin, { TW_UINT16 twRC = TWRC_SUCCESS; /* Return Code */ - TRACE("(DG=%ld DAT=%d MSG=%d)\n", DG, DAT, MSG); + TRACE("(DG=%d DAT=%d MSG=%d)\n", DG, DAT, MSG); if (pDest) { @@ -172,7 +172,7 @@ DSM_Entry (pTW_IDENTITY pOrigin, return TWRC_FAILURE; } DSM_twCC = TWCC_SUCCESS; - TRACE("Forwarding %ld/%d/%d/%p to DS.\n", DG, DAT, MSG, pData); + TRACE("Forwarding %d/%d/%d/%p to DS.\n", DG, DAT, MSG, pData); twRC = pSource->dsEntry(pOrigin, DG, DAT, MSG, pData); TRACE("return value is %d\n", twRC); return twRC; @@ -183,7 +183,7 @@ DSM_Entry (pTW_IDENTITY pOrigin, twRC = TWAIN_SourceManagerHandler (pOrigin, DAT, MSG, pData); break; default: - FIXME("The DSM does not handle DG %ld\n", DG); + FIXME("The DSM does not handle DG %d\n", DG); DSM_twCC = TWCC_BADPROTOCOL; twRC = TWRC_FAILURE; } diff --git a/include/twain.h b/include/twain.h index 13bc406b271..a7ff0f092af 100644 --- a/include/twain.h +++ b/include/twain.h @@ -127,10 +127,10 @@ typedef char TW_STR255[256], FAR *pTW_STR255; /* Numeric types. */ typedef char TW_INT8, FAR *pTW_INT8; typedef short TW_INT16, FAR *pTW_INT16; -typedef long TW_INT32, FAR *pTW_INT32; +typedef LONG TW_INT32, FAR *pTW_INT32; typedef unsigned char TW_UINT8, FAR *pTW_UINT8; typedef unsigned short TW_UINT16, FAR *pTW_UINT16; -typedef unsigned long TW_UINT32, FAR *pTW_UINT32; +typedef ULONG TW_UINT32, FAR *pTW_UINT32; typedef unsigned short TW_BOOL, FAR *pTW_BOOL; /* Fixed point structure type. */