[twain 02/14] Rearrange function position to avoid the need for forward function declarations.

Jeremy White jwhite at codeweavers.com
Fri Feb 6 14:01:11 CST 2009


---
 dlls/sane.ds/capability.c |   71
+++++++++++++++++++++-----------------------
 1 files changed, 34 insertions(+), 37 deletions(-)

diff --git a/dlls/sane.ds/capability.c b/dlls/sane.ds/capability.c
index caff3fd..5738a6e 100644
--- a/dlls/sane.ds/capability.c
+++ b/dlls/sane.ds/capability.c
@@ -31,43 +31,6 @@

 WINE_DEFAULT_DEBUG_CHANNEL(twain);

-static TW_UINT16 SANE_ICAPXferMech (pTW_CAPABILITY pCapability,
TW_UINT16 action);
-static TW_UINT16 TWAIN_GetSupportedCaps(pTW_CAPABILITY pCapability);
-
-TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16
action)
-{
-    TW_UINT16 twCC = TWCC_CAPUNSUPPORTED;
-
-    TRACE("capability=%d action=%d\n", pCapability->Cap, action);
-
-    switch (pCapability->Cap)
-    {
-        case CAP_SUPPORTEDCAPS:
-            if (action == MSG_GET)
-                twCC = TWAIN_GetSupportedCaps(pCapability);
-            else
-                twCC = TWCC_BADVALUE;
-            break;
-
-        case CAP_XFERCOUNT:
-            /* This is a required capability that every source needs to
-               support but we haven't implemented it yet. */
-            twCC = TWCC_SUCCESS;
-            break;
-
-        case ICAP_XFERMECH:
-            twCC = SANE_ICAPXferMech (pCapability, action);
-            break;
-
-        default:
-            twCC = TWRC_FAILURE;
-
-    }
-
-    return twCC;
-}
-
-
 static TW_UINT16 get_onevalue(pTW_CAPABILITY pCapability, TW_UINT16
*type, TW_UINT32 *value)
 {
     if (pCapability->hContainer)
@@ -230,3 +193,37 @@ static TW_UINT16 SANE_ICAPXferMech (pTW_CAPABILITY
pCapability, TW_UINT16 action
     }
     return twCC;
 }
+
+
+TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16
action)
+{
+    TW_UINT16 twCC = TWCC_CAPUNSUPPORTED;
+
+    TRACE("capability=%d action=%d\n", pCapability->Cap, action);
+
+    switch (pCapability->Cap)
+    {
+        case CAP_SUPPORTEDCAPS:
+            if (action == MSG_GET)
+                twCC = TWAIN_GetSupportedCaps(pCapability);
+            else
+                twCC = TWCC_BADVALUE;
+            break;
+
+        case CAP_XFERCOUNT:
+            /* This is a required capability that every source needs to
+               support but we haven't implemented it yet. */
+            twCC = TWCC_SUCCESS;
+            break;
+
+        case ICAP_XFERMECH:
+            twCC = SANE_ICAPXferMech (pCapability, action);
+            break;
+
+        default:
+            twCC = TWRC_FAILURE;
+
+    }
+
+    return twCC;
+}



More information about the wine-patches mailing list