Jeremy White : sane.ds: Rearrange function position to avoid the need for forward function declarations .

Alexandre Julliard julliard at winehq.org
Tue Feb 10 07:45:27 CST 2009


Module: wine
Branch: master
Commit: 25d5953cd8ac92ae6df1e3303b336374ea5b6c1e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=25d5953cd8ac92ae6df1e3303b336374ea5b6c1e

Author: Jeremy White <jwhite at winehq.org>
Date:   Mon Feb  9 13:00:47 2009 -0600

sane.ds: Rearrange function position to avoid the need for forward function declarations.

---

 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-cvs mailing list