Fix a whole lot of merge artifacts or whatever that was that changed indentation...
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 15 Dec 2009 16:33:41 +0000 (16:33 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 15 Dec 2009 16:33:41 +0000 (16:33 +0000)
svn path=/branches/ros-amd64-bringup/; revision=44604

32 files changed:
reactos/dll/win32/mshtml/dispex.c
reactos/dll/win32/mshtml/htmldoc.c
reactos/dll/win32/mshtml/htmliframe.c
reactos/dll/win32/mshtml/htmllocation.c
reactos/dll/win32/mshtml/htmlnode.c
reactos/dll/win32/mshtml/htmlwindow.c
reactos/dll/win32/mshtml/mutation.c
reactos/dll/win32/mshtml/navigate.c
reactos/dll/win32/mshtml/nsio.c
reactos/dll/win32/mshtml/task.c
reactos/dll/win32/msi/action.c
reactos/dll/win32/msi/install.c
reactos/dll/win32/msi/media.c
reactos/dll/win32/msi/msi.c
reactos/dll/win32/msi/msi_main.c
reactos/dll/win32/msi/package.c
reactos/dll/win32/ntdsapi/ntdsapi.rbuild
reactos/dll/win32/olecli32/olecli32.rbuild
reactos/dll/win32/pdh/pdh.rbuild
reactos/dll/win32/printui/printui.rbuild
reactos/dll/win32/shlwapi/ordinal.c
reactos/dll/win32/shlwapi/url.c
reactos/dll/win32/sxs/sxs.rbuild
reactos/dll/win32/winfax/winfax.rbuild
reactos/dll/win32/wininet/cookie.c
reactos/dll/win32/wininet/dialogs.c
reactos/dll/win32/wininet/ftp.c
reactos/dll/win32/wininet/http.c
reactos/dll/win32/wininet/internet.c
reactos/dll/win32/wininet/internet.h
reactos/dll/win32/wininet/netconnection.c
reactos/dll/win32/wininet/urlcache.c

index 6c06b9e..980b13b 100644 (file)
@@ -813,7 +813,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
             if(This->data->vtbl && This->data->vtbl->value) {
                 return This->data->vtbl->value(This->outer, lcid, wFlags, pdp,
                         pvarRes, pei, pspCaller);
-    }
+            }
             FIXME("DISPATCH_CONSTRUCT flag but missing value function\n");
             return E_FAIL;
         }
index 92c6638..836f1ae 100644 (file)
@@ -1992,9 +1992,9 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
         return hres;
 
 
-        nsres = nsIWebBrowser_GetContentDOMWindow(doc->nscontainer->webbrowser, &nswindow);
-        if(NS_FAILED(nsres))
-            ERR("GetContentDOMWindow failed: %08x\n", nsres);
+    nsres = nsIWebBrowser_GetContentDOMWindow(doc->nscontainer->webbrowser, &nswindow);
+    if(NS_FAILED(nsres))
+        ERR("GetContentDOMWindow failed: %08x\n", nsres);
 
     hres = HTMLWindow_Create(doc, nswindow, NULL /* FIXME */, &doc->basedoc.window);
     if(nswindow)
index a0f8114..daef946 100644 (file)
@@ -109,7 +109,7 @@ static HRESULT WINAPI HTMLIFrameBase2_get_contentWindow(IHTMLFrameBase2 *iface,
     }else {
         WARN("NULL content window\n");
         *p = NULL;
-        }
+    }
     return S_OK;
 }
 
index 8175e99..3b91429 100644 (file)
@@ -157,7 +157,7 @@ static HRESULT WINAPI HTMLLocation_put_href(IHTMLLocation *iface, BSTR v)
     if(!This->window || !This->window->doc) {
         FIXME("No document available\n");
         return E_FAIL;
-}
+    }
 
     return navigate_url(This->window->doc, v);
 }
@@ -195,7 +195,7 @@ static HRESULT WINAPI HTMLLocation_get_href(IHTMLLocation *iface, BSTR *p)
             memcpy(url_path + 1, url.lpszUrlPath, url.dwUrlPathLength * sizeof(WCHAR));
             url.lpszUrlPath = url_path;
             url.dwUrlPathLength = url.dwUrlPathLength + 1;
-}
+        }
         break;
 
     case INTERNET_SCHEME_HTTP:
@@ -287,13 +287,13 @@ static HRESULT WINAPI HTMLLocation_get_protocol(IHTMLLocation *iface, BSTR *p)
 
     if(!url.dwSchemeLength) {
         FIXME("Unexpected blank protocol\n");
-    return E_NOTIMPL;
+        return E_NOTIMPL;
     }else {
         WCHAR buf[url.dwSchemeLength + 1];
         memcpy(buf, url.lpszScheme, url.dwSchemeLength * sizeof(WCHAR));
         buf[url.dwSchemeLength] = ':';
         *p = SysAllocStringLen(buf, url.dwSchemeLength + 1);
-}
+    }
     if(!*p)
         return E_OUTOFMEMORY;
     return S_OK;
@@ -325,7 +325,7 @@ static HRESULT WINAPI HTMLLocation_get_host(IHTMLLocation *iface, BSTR *p)
     if(!url.dwHostNameLength){
         *p = NULL;
         return S_OK;
-}
+    }
 
     if(url.nPort) {
         /* <hostname>:<port> */
@@ -371,7 +371,7 @@ static HRESULT WINAPI HTMLLocation_get_hostname(IHTMLLocation *iface, BSTR *p)
     if(!url.dwHostNameLength){
         *p = NULL;
         return S_OK;
-}
+    }
 
     *p = SysAllocStringLen(url.lpszHostName, url.dwHostNameLength);
     if(!*p)
@@ -409,7 +409,7 @@ static HRESULT WINAPI HTMLLocation_get_port(IHTMLLocation *iface, BSTR *p)
     }else {
         const WCHAR empty[] = {0};
         *p = SysAllocString(empty);
-}
+    }
 
     if(!*p)
         return E_OUTOFMEMORY;
@@ -477,7 +477,7 @@ static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p)
     if(!url.dwExtraInfoLength){
         *p = NULL;
         return S_OK;
-}
+    }
 
     url.dwExtraInfoLength = strcspnW(url.lpszExtraInfo, hash);
 
@@ -516,7 +516,7 @@ static HRESULT WINAPI HTMLLocation_get_hash(IHTMLLocation *iface, BSTR *p)
     if(!url.dwExtraInfoLength){
         *p = NULL;
         return S_OK;
-}
+    }
 
     hash_pos = strcspnW(url.lpszExtraInfo, hash);
     url.dwExtraInfoLength -= hash_pos;
index 9ca324a..b8cecf0 100644 (file)
@@ -739,7 +739,7 @@ static HRESULT WINAPI HTMLDOMNode_get_nextSibling(IHTMLDOMNode *iface, IHTMLDOMN
         IHTMLDOMNode_AddRef(*p);
     }else {
         *p = NULL;
-}
+    }
 
     return S_OK;
 }
@@ -840,8 +840,8 @@ static HRESULT WINAPI HTMLDOMNode2_get_ownerDocument(IHTMLDOMNode2 *iface, IDisp
     if(This == &This->doc->node) {
         *p = NULL;
     }else {
-    *p = (IDispatch*)HTMLDOC(&This->doc->basedoc);
-    IDispatch_AddRef(*p);
+        *p = (IDispatch*)HTMLDOC(&This->doc->basedoc);
+        IDispatch_AddRef(*p);
     }
     return S_OK;
 }
@@ -917,7 +917,7 @@ void HTMLDOMNode_Init(HTMLDocumentNode *doc, HTMLDOMNode *node, nsIDOMNode *nsno
     node->doc = doc;
 
     if(nsnode)
-    nsIDOMNode_AddRef(nsnode);
+        nsIDOMNode_AddRef(nsnode);
     node->nsnode = nsnode;
 
     node->next = doc->nodes;
index 5204394..9f3b3e7 100644 (file)
@@ -53,7 +53,7 @@ static void window_set_docnode(HTMLWindow *window, HTMLDocumentNode *doc_node)
         window->doc_obj->basedoc.doc_node = doc_node;
         if(doc_node)
             htmldoc_addref(&doc_node->basedoc);
-}
+    }
 }
 
 nsIDOMWindow *get_nsdoc_window(nsIDOMDocument *nsdoc)
@@ -252,7 +252,7 @@ static HRESULT WINAPI HTMLWindow2_get_length(IHTMLWindow2 *iface, LONG *p)
     if(NS_FAILED(nsres)) {
         ERR("GetFrames failed: %08x\n", nsres);
         return E_FAIL;
-}
+    }
 
     nsres = nsIDOMWindowCollection_GetLength(nscollection, &length);
     nsIDOMWindowCollection_Release(nscollection);
@@ -565,7 +565,7 @@ static HRESULT WINAPI HTMLWindow2_get_name(IHTMLWindow2 *iface, BSTR *p)
         }else {
             *p = NULL;
             hres = S_OK;
-}
+        }
     }else {
         ERR("GetName failed: %08x\n", nsres);
         hres = E_FAIL;
@@ -1021,21 +1021,21 @@ static HRESULT HTMLWindow_invoke(IUnknown *iface, DISPID id, LCID lcid, WORD fla
         IDispatch *disp;
 
         disp = get_script_disp(prop->script_host);
-    if(!disp)
-        return E_UNEXPECTED;
+        if(!disp)
+            return E_UNEXPECTED;
 
-    hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
-    if(SUCCEEDED(hres)) {
+        hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
+        if(SUCCEEDED(hres)) {
             TRACE("%s >>>\n", debugstr_w(prop->name));
             hres = IDispatchEx_InvokeEx(dispex, prop->id, lcid, flags, params, res, ei, caller);
-        if(hres == S_OK)
+            if(hres == S_OK)
                 TRACE("%s <<<\n", debugstr_w(prop->name));
-        else
+            else
                 WARN("%s <<< %08x\n", debugstr_w(prop->name), hres);
-        IDispatchEx_Release(dispex);
-    }else {
-        FIXME("No IDispatchEx\n");
-    }
+            IDispatchEx_Release(dispex);
+        }else {
+            FIXME("No IDispatchEx\n");
+        }
         IDispatch_Release(disp);
         break;
     }
@@ -1044,7 +1044,7 @@ static HRESULT HTMLWindow_invoke(IUnknown *iface, DISPID id, LCID lcid, WORD fla
 
         hres = IHTMLDocument3_getElementById(HTMLDOC3(&This->doc->basedoc), prop->name, &elem);
         if(FAILED(hres))
-    return hres;
+            return hres;
 
         if(!elem)
             return DISP_E_MEMBERNOTFOUND;
@@ -1052,7 +1052,7 @@ static HRESULT HTMLWindow_invoke(IUnknown *iface, DISPID id, LCID lcid, WORD fla
         V_VT(res) = VT_DISPATCH;
         V_DISPATCH(res) = (IDispatch*)elem;
         break;
-}
+    }
     default:
         ERR("invalid type %d\n", prop->type);
         hres = DISP_E_MEMBERNOTFOUND;
@@ -1480,14 +1480,14 @@ static HRESULT WINAPI WindowDispEx_GetDispID(IDispatchEx *iface, BSTR bstrName,
 
         prop = alloc_global_prop(This, GLOBAL_SCRIPTVAR, bstrName);
         if(!prop)
-                return E_OUTOFMEMORY;
+            return E_OUTOFMEMORY;
 
         prop->script_host = script_host;
         prop->id = id;
 
         *pid = prop_to_dispid(This, prop);
         return S_OK;
-        }
+    }
 
     hres = IDispatchEx_GetDispID(DISPATCHEX(&This->dispex), bstrName, grfdex, pid);
     if(hres != DISP_E_UNKNOWNNAME)
@@ -1503,11 +1503,11 @@ static HRESULT WINAPI WindowDispEx_GetDispID(IDispatchEx *iface, BSTR bstrName,
 
             prop = alloc_global_prop(This, GLOBAL_ELEMENTVAR, bstrName);
             if(!prop)
-            return E_OUTOFMEMORY;
+                return E_OUTOFMEMORY;
 
             *pid = prop_to_dispid(This, prop);
-        return S_OK;
-    }
+            return S_OK;
+        }
     }
 
     return DISP_E_UNKNOWNNAME;
index e15a1cc..84c9241 100644 (file)
@@ -267,7 +267,7 @@ static void pop_mutation_queue(HTMLDocumentNode *doc)
         doc->mutation_queue_tail = NULL;
 
     if(tmp->nsiface)
-    nsISupports_Release(tmp->nsiface);
+        nsISupports_Release(tmp->nsiface);
     heap_free(tmp);
 }
 
@@ -691,7 +691,7 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface,
 
         push_mutation_queue(This, MUTATION_IFRAME, (nsISupports*)nsiframe);
         nsIDOMHTMLIFrameElement_Release(nsiframe);
-}
+    }
 
     nsres = nsISupports_QueryInterface(aContent, &IID_nsIDOMHTMLFrameElement, (void**)&nsframe);
     if(NS_SUCCEEDED(nsres)) {
@@ -762,7 +762,7 @@ void init_mutation(HTMLDocumentNode *doc)
     if(NS_FAILED(nsres)) {
         ERR("Could not get nsIDOMNSDocument: %08x\n", nsres);
         return;
-}
+    }
 
     nsIDOMNSDocument_WineAddObserver(nsdoc, NSDOCOBS(doc));
     nsIDOMNSDocument_Release(nsdoc);
index c350efa..727eaef 100644 (file)
@@ -955,7 +955,7 @@ static HRESULT read_stream_data(nsChannelBSC *This, IStream *stream)
 
             if(This->window)
                 update_window_doc(This->window);
-            }
+        }
 
         This->bsc.readed += This->nsstream->buf_size;
 
index fb8b1a2..9792747 100644 (file)
@@ -156,7 +156,7 @@ static BOOL before_async_open(nsChannel *channel, NSContainer *container)
 
     hres = hlink_frame_navigate(&doc->basedoc, uri, channel->post_data_stream, hlnf);
     return hres != S_OK;
-        }
+}
 
 #define NSCHANNEL_THIS(iface) DEFINE_THIS(nsChannel, HttpChannel, iface)
 
@@ -705,14 +705,14 @@ static HTMLWindow *get_channel_window(nsChannel *This)
     if(NS_FAILED(nsres)) {
         ERR("Could not get nsIWebProgress iface: %08x\n", nsres);
         return NULL;
-        }
+    }
 
     nsres = nsIWebProgress_GetDOMWindow(web_progress, &nswindow);
     nsIWebProgress_Release(web_progress);
     if(NS_FAILED(nsres) || !nswindow) {
         ERR("GetDOMWindow failed: %08x\n", nsres);
         return NULL;
-        }
+    }
 
     window = nswindow_to_window(nswindow);
     nsIDOMWindow_Release(nswindow);
@@ -722,7 +722,7 @@ static HTMLWindow *get_channel_window(nsChannel *This)
     else
         FIXME("NULL window for %p\n", nswindow);
     return window;
-        }
+}
 
 typedef struct {
     task_t header;
@@ -735,7 +735,7 @@ static void start_binding_proc(task_t *_task)
     start_binding_task_t *task = (start_binding_task_t*)_task;
 
     start_binding(NULL, task->doc, (BSCallback*)task->bscallback, NULL);
-        }
+}
 
 typedef struct {
     task_t header;
@@ -777,7 +777,7 @@ static nsresult async_open(nsChannel *This, HTMLWindow *window, BOOL is_doc_chan
 
         task = heap_alloc(sizeof(start_doc_binding_task_t));
         task->window = window;
-    task->bscallback = bscallback;
+        task->bscallback = bscallback;
         push_task(&task->header, start_doc_binding_proc, window->task_magic);
     }else {
         start_binding_task_t *task = heap_alloc(sizeof(start_binding_task_t));
index c5182f7..e6b94a2 100644 (file)
@@ -203,7 +203,7 @@ void parse_complete(HTMLDocumentObj *doc)
 {
     TRACE("(%p)\n", doc);
 
-    }
+}
 
 static void call_timer_disp(IDispatch *disp)
 {
index 35a4d7f..3a11c61 100644 (file)
@@ -4921,20 +4921,20 @@ static LONG env_set_flags( LPCWSTR *name, LPCWSTR *value, DWORD *flags )
     if (*value)
     {
         LPCWSTR ptr = *value;
-    if (!strncmpW(ptr, prefix, prefix_len))
-    {
-        *flags |= ENV_MOD_APPEND;
-        *value += lstrlenW(prefix);
-    }
-    else if (lstrlenW(*value) >= prefix_len)
-    {
-        ptr += lstrlenW(ptr) - prefix_len;
-        if (!lstrcmpW(ptr, prefix))
+        if (!strncmpW(ptr, prefix, prefix_len))
         {
-            *flags |= ENV_MOD_PREFIX;
-            /* the "[~]" will be removed by deformat_string */;
+            *flags |= ENV_MOD_APPEND;
+            *value += lstrlenW(prefix);
+        }
+        else if (lstrlenW(*value) >= prefix_len)
+        {
+            ptr += lstrlenW(ptr) - prefix_len;
+            if (!lstrcmpW(ptr, prefix))
+            {
+                *flags |= ENV_MOD_PREFIX;
+                /* the "[~]" will be removed by deformat_string */;
+            }
         }
-    }
     }
 
     if (check_flag_combo(*flags, ENV_ACT_SETALWAYS | ENV_ACT_SETABSENT) ||
@@ -5083,8 +5083,8 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param )
 
     if (newval)
     {
-    TRACE("setting %s to %s\n", debugstr_w(name), debugstr_w(newval));
-    res = RegSetValueExW(env, name, 0, type, (LPVOID)newval, size);
+        TRACE("setting %s to %s\n", debugstr_w(name), debugstr_w(newval));
+        res = RegSetValueExW(env, name, 0, type, (LPVOID)newval, size);
     }
     else
         res = ERROR_SUCCESS;
index f77da3f..1a535eb 100644 (file)
@@ -1001,8 +1001,8 @@ UINT WINAPI MsiGetFeatureCostW(MSIHANDLE hInstall, LPCWSTR szFeature,
             return ERROR_FUNCTION_FAILED;
         }
 
-    return ERROR_SUCCESS;
-}
+        return ERROR_SUCCESS;
+    }
 
     feature = get_loaded_feature(package, szFeature);
 
index 82fb414..67cb7dc 100644 (file)
@@ -104,7 +104,7 @@ static UINT msi_change_media(MSIPACKAGE *package, MSIMEDIAINFO *mi)
             MsiRecordSetStringW(rec, 0, error);
             gUIHandlerRecord(gUIContext, MB_RETRYCANCEL | INSTALLMESSAGE_ERROR, rec);
             MsiCloseHandle(rec);
-    }
+        }
     }
 
     msi_free(error);
index 6359912..2515714 100644 (file)
@@ -1906,8 +1906,8 @@ INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(INSTALLUI_HANDLERA puiHandler,
 
     gUIHandlerA = puiHandler;
     gUIHandlerW = NULL;
-    gUIFilter = dwMessageFilter;
-    gUIContext = pvContext;
+    gUIFilter   = dwMessageFilter;
+    gUIContext  = pvContext;
 
     return prev;
 }
@@ -1921,8 +1921,8 @@ INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(INSTALLUI_HANDLERW puiHandler,
 
     gUIHandlerA = NULL;
     gUIHandlerW = puiHandler;
-    gUIFilter = dwMessageFilter;
-    gUIContext = pvContext;
+    gUIFilter   = dwMessageFilter;
+    gUIContext  = pvContext;
 
     return prev;
 }
index 1d910de..df29184 100644 (file)
@@ -37,13 +37,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
 static LONG dll_count;
 
 /* the UI level */
-INSTALLUILEVEL gUILevel = INSTALLUILEVEL_BASIC;
-HWND           gUIhwnd = 0;
-INSTALLUI_HANDLERA gUIHandlerA = NULL;
-INSTALLUI_HANDLERW gUIHandlerW = NULL;
+INSTALLUILEVEL           gUILevel         = INSTALLUILEVEL_BASIC;
+HWND                     gUIhwnd          = 0;
+INSTALLUI_HANDLERA       gUIHandlerA      = NULL;
+INSTALLUI_HANDLERW       gUIHandlerW      = NULL;
 INSTALLUI_HANDLER_RECORD gUIHandlerRecord = NULL;
-DWORD gUIFilter = 0;
-LPVOID gUIContext = NULL;
+DWORD                    gUIFilter        = 0;
+LPVOID                   gUIContext       = NULL;
 WCHAR gszLogFile[MAX_PATH];
 HINSTANCE msi_hInstance;
 
index 92f9200..87f1092 100644 (file)
@@ -1217,7 +1217,7 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
     }
     else if (gUIHandlerA && (gUIFilter & log_type))
     {
-        rc = gUIHandlerA(gUIContext,eMessageType,msg);
+        rc = gUIHandlerA( gUIContext, eMessageType, msg );
     }
     else if (gUIHandlerRecord && (gUIFilter & log_type))
     {
@@ -1243,7 +1243,7 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
         }
     }
     msi_free( msg );
-    msi_free( message);
+    msi_free( message );
 
     switch (eMessageType & 0xff000000)
     {
index deb8174..9048109 100644 (file)
@@ -1,10 +1,10 @@
 <module name="ntdsapi" type="win32dll" baseaddress="${BASEADDRESS_NTDSAPI}" installbase="system32" installname="ntdsapi.dll" allowwarnings="true" entrypoint="0">
-        <importlibrary definition="ntdsapi.spec" />
-        <include base="ntdsapi">.</include>
-        <include base="ReactOS">include/reactos/wine</include>
-        <define name="__WINESRC__" />
-        <library>wine</library>
-        <library>user32</library>
-        <library>ntdll</library>
-        <file>ntdsapi.c</file>
+       <importlibrary definition="ntdsapi.spec" />
+       <include base="ntdsapi">.</include>
+       <include base="ReactOS">include/reactos/wine</include>
+       <define name="__WINESRC__" />
+       <library>wine</library>
+       <library>user32</library>
+       <library>ntdll</library>
+       <file>ntdsapi.c</file>
 </module>
index b7323da..29e90e8 100644 (file)
@@ -1,13 +1,13 @@
 <?xml version="1.0"?>
 <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
 <module name="olecli32" type="win32dll" baseaddress="${BASEADDRESS_OLECLI32}" installbase="system32" installname="olecli32.dll" allowwarnings="true" entrypoint="0">
-        <importlibrary definition="olecli32.spec" />
-        <include base="olecli32">.</include>
-        <include base="ReactOS">include/reactos/wine</include>
-        <define name="__WINESRC__" />
-        <file>olecli_main.c</file>
-        <library>wine</library>
-        <library>ole32</library>
-        <library>gdi32</library>
-        <library>ntdll</library>
+       <importlibrary definition="olecli32.spec" />
+       <include base="olecli32">.</include>
+       <include base="ReactOS">include/reactos/wine</include>
+       <define name="__WINESRC__" />
+       <file>olecli_main.c</file>
+       <library>wine</library>
+       <library>ole32</library>
+       <library>gdi32</library>
+       <library>ntdll</library>
 </module>
index c994633..db1ea7e 100644 (file)
@@ -1,10 +1,10 @@
 <module name="pdh" type="win32dll" baseaddress="${BASEADDRESS_PDH}" installbase="system32" installname="pdh.dll" allowwarnings="true" entrypoint="0">
-        <importlibrary definition="pdh.spec" />
-        <include base="pdh">.</include>
-        <include base="ReactOS">include/reactos/wine</include>
-        <define name="__WINESRC__" />
-        <redefine name="_WIN32_WINNT">0x600</redefine>
-        <library>wine</library>
-        <library>ntdll</library>
-        <file>pdh_main.c</file>
+       <importlibrary definition="pdh.spec" />
+       <include base="pdh">.</include>
+       <include base="ReactOS">include/reactos/wine</include>
+       <define name="__WINESRC__" />
+       <redefine name="_WIN32_WINNT">0x600</redefine>
+       <library>wine</library>
+       <library>ntdll</library>
+       <file>pdh_main.c</file>
 </module>
index 3620c69..6596eb2 100644 (file)
@@ -1,11 +1,11 @@
 <module name="printui" type="win32dll" baseaddress="${BASEADDRESS_PRINTUI}" installbase="system32" installname="printui.dll" allowwarnings="true" entrypoint="0">
-        <importlibrary definition="printui.spec" />
-        <include base="printui">.</include>
-        <include base="ReactOS">include/reactos/wine</include>
-        <define name="__WINESRC__" />
-        <library>wine</library>
-        <library>shell32</library>
-        <library>ntdll</library>
-        <file>printui.c</file>
-        <file>printui.rc</file>
+       <importlibrary definition="printui.spec" />
+       <include base="printui">.</include>
+       <include base="ReactOS">include/reactos/wine</include>
+       <define name="__WINESRC__" />
+       <library>wine</library>
+       <library>shell32</library>
+       <library>ntdll</library>
+       <file>printui.c</file>
+       <file>printui.rc</file>
 </module>
index 6d002ad..0ecbab8 100644 (file)
@@ -1250,12 +1250,10 @@ BOOL WINAPI SHIsSameObject(IUnknown* lpInt1, IUnknown* lpInt2)
   if (lpInt1 == lpInt2)
     return TRUE;
 
-  if (FAILED(IUnknown_QueryInterface(lpInt1, &IID_IUnknown,
-                                       (LPVOID *)&lpUnknown1)))
+  if (FAILED(IUnknown_QueryInterface(lpInt1, &IID_IUnknown, &lpUnknown1)))
     return FALSE;
 
-  if (FAILED(IUnknown_QueryInterface(lpInt2, &IID_IUnknown,
-                                       (LPVOID *)&lpUnknown2)))
+  if (FAILED(IUnknown_QueryInterface(lpInt2, &IID_IUnknown, &lpUnknown2)))
     return FALSE;
 
   if (lpUnknown1 == lpUnknown2)
@@ -2273,7 +2271,7 @@ HRESULT WINAPI QISearch(
                if (IsEqualIID(riid, xmove->refid)) {
                    a_vtbl = (IUnknown*)(xmove->indx + (LPBYTE)w);
                    TRACE("matched, returning (%p)\n", a_vtbl);
-                   *ppv = (LPVOID)a_vtbl;
+                    *ppv = a_vtbl;
                    IUnknown_AddRef(a_vtbl);
                    return S_OK;
                }
@@ -2283,7 +2281,7 @@ HRESULT WINAPI QISearch(
            if (IsEqualIID(riid, &IID_IUnknown)) {
                a_vtbl = (IUnknown*)(x->indx + (LPBYTE)w);
                TRACE("returning first for IUnknown (%p)\n", a_vtbl);
-               *ppv = (LPVOID)a_vtbl;
+                *ppv = a_vtbl;
                IUnknown_AddRef(a_vtbl);
                return S_OK;
            }
@@ -2576,7 +2574,7 @@ DWORD WINAPI SHGetRestriction(LPCWSTR lpSubKey, LPCWSTR lpSubName, LPCWSTR lpVal
        if (retval != ERROR_SUCCESS)
          return 0;
 
-       SHGetValueW(hKey, lpSubName, lpValue, NULL, (LPBYTE)&retval, &datsize);
+        SHGetValueW(hKey, lpSubName, lpValue, NULL, &retval, &datsize);
        RegCloseKey(hKey);
        return retval;
 }
@@ -2655,7 +2653,7 @@ HRESULT WINAPI SHWeakQueryInterface(
 
        *ppv = NULL;
        if(pUnk && pInner) {
-           hret = IUnknown_QueryInterface(pInner, riid, (LPVOID*)ppv);
+            hret = IUnknown_QueryInterface(pInner, riid, ppv);
            if (SUCCEEDED(hret)) IUnknown_Release(pUnk);
        }
        TRACE("-- 0x%08x\n", hret);
@@ -4224,7 +4222,7 @@ BOOL WINAPI SHSkipJunction(IBindCtx *pbc, const CLSID *pclsid)
   {
     IUnknown* lpUnk;
 
-    if (SUCCEEDED(IBindCtx_GetObjectParam(pbc, (LPOLESTR)szSkipBinding, &lpUnk)))
+    if (SUCCEEDED(IBindCtx_GetObjectParam(pbc, szSkipBinding, &lpUnk)))
     {
       CLSID clsid;
 
index a8fc3d0..2b7a8cd 100644 (file)
@@ -167,7 +167,7 @@ HRESULT WINAPI ParseURLA(LPCSTR x, PARSEDURLA *y)
     y->cchSuffix = strlen(y->pszSuffix);
 
     len = MultiByteToWideChar(CP_ACP, 0, x, ptr-x,
-                              scheme, sizeof(scheme)/sizeof(WCHAR));
+            scheme, sizeof(scheme)/sizeof(WCHAR));
     y->nScheme = get_scheme_code(scheme, len);
 
     return S_OK;
index 61864ae..3e0c4b7 100644 (file)
@@ -1,11 +1,11 @@
 <?xml version="1.0"?>
 <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
 <module name="sxs" type="win32dll" baseaddress="${BASEADDRESS_SXS}" installbase="system32" installname="sxs.dll" allowwarnings="true" entrypoint="0">
-        <importlibrary definition="sxs.spec" />
-        <include base="sxs">.</include>
-        <include base="ReactOS">include/reactos/wine</include>
-        <define name="__WINESRC__" />
-        <file>sxs.c</file>
-        <library>wine</library>
-        <library>ntdll</library>
+       <importlibrary definition="sxs.spec" />
+       <include base="sxs">.</include>
+       <include base="ReactOS">include/reactos/wine</include>
+       <define name="__WINESRC__" />
+       <file>sxs.c</file>
+       <library>wine</library>
+       <library>ntdll</library>
 </module>
index aa7b87d..1f99d1e 100644 (file)
@@ -1,7 +1,7 @@
 <module name="winfax" type="win32dll" baseaddress="${BASEADDRESS_WINFAX}" installbase="system32" installname="winfax.dll" allowwarnings="true" entrypoint="0">
-        <importlibrary definition="winfax.spec" />
-        <include base="winfax">.</include>
-        <library>ntdll</library>
-        <file>winfax.c</file>
-        <file>winfax.rc</file>
+       <importlibrary definition="winfax.spec" />
+       <include base="winfax">.</include>
+       <library>ntdll</library>
+       <file>winfax.c</file>
+       <file>winfax.rc</file>
 </module>
index b11706a..12d841b 100644 (file)
@@ -192,7 +192,7 @@ static BOOL COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostName
     UrlComponents.dwUrlPathLength = pathLen;
 
     return InternetCrackUrlW(lpszUrl, 0, 0, &UrlComponents);
-        }
+}
 
 /* match a domain. domain must match if the domain is not NULL. path must match if the path is not NULL */
 static BOOL COOKIE_matchDomain(LPCWSTR lpszCookieDomain, LPCWSTR lpszCookiePath,
@@ -219,8 +219,8 @@ static BOOL COOKIE_matchDomain(LPCWSTR lpszCookieDomain, LPCWSTR lpszCookiePath,
         if (!searchDomain->lpCookiePath)
             return FALSE;
         if (strcmpW(lpszCookiePath, searchDomain->lpCookiePath))
-                return FALSE;
-        }
+            return FALSE;
+       }
        return TRUE;
 }
 
@@ -415,7 +415,7 @@ static BOOL set_cookie(LPCWSTR domain, LPCWSTR path, LPCWSTR cookie_name, LPCWST
     }
 
     if (!thisCookieDomain)
-            thisCookieDomain = COOKIE_addDomain(domain, path);
+        thisCookieDomain = COOKIE_addDomain(domain, path);
 
     if ((thisCookie = COOKIE_findCookie(thisCookieDomain, cookie_name)))
         COOKIE_deleteCookie(thisCookie, FALSE);
index 613c46e..dd5aa31 100644 (file)
@@ -65,7 +65,7 @@ static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
 
     lpwhr = (LPWININETHTTPREQW) WININET_GetObject( hRequest );
     if (NULL == lpwhr)
-        return FALSE;
+       return FALSE;
 
     lpwhs = lpwhr->lpHttpSession;
     if (NULL == lpwhs)
@@ -206,8 +206,8 @@ static BOOL WININET_SetProxyAuthorization( HINTERNET hRequest,
 
     lpwhr = (LPWININETHTTPREQW) WININET_GetObject( hRequest );
     if( !lpwhr )
-        return FALSE;
-
+       return FALSE;
+        
     lpwhs = lpwhr->lpHttpSession;
     if (NULL == lpwhs ||  lpwhs->hdr.htype != WH_HHTTPSESSION)
     {
@@ -220,14 +220,14 @@ static BOOL WININET_SetProxyAuthorization( HINTERNET hRequest,
     p = HeapAlloc( GetProcessHeap(), 0, (strlenW( username ) + 1)*sizeof(WCHAR) );
     if( !p )
         return FALSE;
-
+    
     lstrcpyW( p, username );
-        hIC->lpszProxyUsername = p;
+    hIC->lpszProxyUsername = p;
 
     p = HeapAlloc( GetProcessHeap(), 0, (strlenW( password ) + 1)*sizeof(WCHAR) );
     if( !p )
         return FALSE;
-
+    
     lstrcpyW( p, password );
     hIC->lpszProxyPassword = p;
 
@@ -367,8 +367,8 @@ DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest,
         dwStatus = WININET_GetConnectionStatus( hRequest );
         if( HTTP_STATUS_PROXY_AUTH_REQ != dwStatus )
             return ERROR_SUCCESS;
-            return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ),
-                                    hWnd, WININET_ProxyPasswordDialog, (LPARAM) &params );
+        return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ),
+                    hWnd, WININET_ProxyPasswordDialog, (LPARAM) &params );
 
     case ERROR_INTERNET_INCORRECT_PASSWORD:
         return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ),
index e7bc6e1..770fef2 100644 (file)
@@ -710,7 +710,7 @@ HINTERNET WINAPI FtpFindFirstFileA(HINTERNET hConnect,
     
     if (ret && lpFindFileData)
         WININET_find_data_WtoA(lpFindFileDataW, lpFindFileData);
-
+    
     return ret;
 }
 
@@ -1087,7 +1087,7 @@ HINTERNET WINAPI FtpOpenFileA(HINTERNET hFtpSession,
 {
     LPWSTR lpwzFileName;
     HINTERNET ret;
-
+    
     lpwzFileName = lpszFileName?WININET_strdup_AtoW(lpszFileName):NULL;
     ret = FtpOpenFileW(hFtpSession, lpwzFileName, fdwAccess, dwFlags, dwContext);
     HeapFree(GetProcessHeap(), 0, lpwzFileName);
@@ -1347,9 +1347,9 @@ HINTERNET FTP_FtpOpenFileW(LPWININETFTPSESSIONW lpwfs,
 
         iar.dwResult = (DWORD)bSuccess;
         iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError();
-            SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
-                    &iar, sizeof(INTERNET_ASYNC_RESULT));
-        }
+        SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
+            &iar, sizeof(INTERNET_ASYNC_RESULT));
+    }
 
 lend:
     if( lpwh )
@@ -3515,7 +3515,7 @@ static BOOL FTP_ParseNextFile(INT nSocket, LPCWSTR lpszSearchFile, LPFILEPROPERT
             /* Hacky and bad Y2K protection :-) */
             if (lpfp->tmLastModified.tm_year < 70)
                 lpfp->tmLastModified.tm_year += 100;
-
+            
             pszToken = strtok(NULL, szSpace);
             if(!pszToken) continue;
             sscanf(pszToken, "%d:%d",
@@ -3530,7 +3530,7 @@ static BOOL FTP_ParseNextFile(INT nSocket, LPCWSTR lpszSearchFile, LPFILEPROPERT
                 lpfp->tmLastModified.tm_hour, lpfp->tmLastModified.tm_min, lpfp->tmLastModified.tm_sec,
                 (lpfp->tmLastModified.tm_year >= 100) ? lpfp->tmLastModified.tm_year - 100 : lpfp->tmLastModified.tm_year,
                 lpfp->tmLastModified.tm_mon, lpfp->tmLastModified.tm_mday);
-
+            
             pszToken = strtok(NULL, szSpace);
             if(!pszToken) continue;
             if(!strcasecmp(pszToken, "<DIR>")) {
index 0ab508d..f0ad6be 100644 (file)
@@ -146,21 +146,21 @@ static LPWSTR * HTTP_Tokenize(LPCWSTR string, LPCWSTR token_string)
     int i;
     LPCWSTR next_token;
 
-        /* empty string has no tokens */
-        if (*string)
+    /* empty string has no tokens */
+    if (*string)
+        tokens++;
+    /* count tokens */
+    for (i = 0; string[i]; i++)
+        if (!strncmpW(string+i, token_string, strlenW(token_string)))
+        {
+            DWORD j;
             tokens++;
-        /* count tokens */
-        for (i = 0; string[i]; i++)
-            if (!strncmpW(string+i, token_string, strlenW(token_string)))
-            {
-                DWORD j;
-                tokens++;
-                /* we want to skip over separators, but not the null terminator */
-                for (j = 0; j < strlenW(token_string) - 1; j++)
-                    if (!string[i+j])
-                        break;
-                i += j;
-            }
+            /* we want to skip over separators, but not the null terminator */
+            for (j = 0; j < strlenW(token_string) - 1; j++)
+                if (!string[i+j])
+                    break;
+            i += j;
+        }
 
     /* add 1 for terminating NULL */
     token_array = HeapAlloc(GetProcessHeap(), 0, (tokens+1) * sizeof(*token_array));
@@ -318,10 +318,10 @@ static void HTTP_ProcessCookies( LPWININETHTTPREQW lpwhr )
     HeaderIndex = HTTP_GetCustomHeaderIndex(lpwhr, szSet_Cookie, 0, FALSE);
     if (HeaderIndex == -1)
             return;
-        setCookieHeader = &lpwhr->pCustHeaders[HeaderIndex];
+    setCookieHeader = &lpwhr->pCustHeaders[HeaderIndex];
 
-        if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES) && setCookieHeader->lpszValue)
-        {
+    if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES) && setCookieHeader->lpszValue)
+    {
         int nPosStart = 0, nPosEnd = 0, len;
         static const WCHAR szFmt[] = { 'h','t','t','p',':','/','/','%','s','/',0};
 
@@ -335,11 +335,11 @@ static void HTTP_ProcessCookies( LPWININETHTTPREQW lpwhr )
             int nEqualPos = 0;
             while (setCookieHeader->lpszValue[nPosEnd] != ';' && setCookieHeader->lpszValue[nPosEnd] != ',' &&
                    setCookieHeader->lpszValue[nPosEnd] != '\0')
-{
+            {
                 nPosEnd++;
-    }
+            }
             if (setCookieHeader->lpszValue[nPosEnd] == ';')
-{
+            {
                 /* fixme: not case sensitive, strcasestr is gnu only */
                 int nDomainPosEnd = 0;
                 int nDomainPosStart = 0, nDomainLength = 0;
@@ -349,28 +349,28 @@ static void HTTP_ProcessCookies( LPWININETHTTPREQW lpwhr )
                 { /* they have specified their own domain, lets use it */
                     while (lpszDomain[nDomainPosEnd] != ';' && lpszDomain[nDomainPosEnd] != ',' &&
                            lpszDomain[nDomainPosEnd] != '\0')
-    {
+                    {
                         nDomainPosEnd++;
-        }
+                    }
                     nDomainPosStart = strlenW(szDomain);
                     nDomainLength = (nDomainPosEnd - nDomainPosStart) + 1;
                     domain = HeapAlloc(GetProcessHeap(), 0, (nDomainLength + 1)*sizeof(WCHAR));
                     lstrcpynW(domain, &lpszDomain[nDomainPosStart], nDomainLength + 1);
-    }
-}
+                }
+            }
             if (setCookieHeader->lpszValue[nPosEnd] == '\0') break;
             buf_cookie = HeapAlloc(GetProcessHeap(), 0, ((nPosEnd - nPosStart) + 1)*sizeof(WCHAR));
             lstrcpynW(buf_cookie, &setCookieHeader->lpszValue[nPosStart], (nPosEnd - nPosStart) + 1);
             TRACE("%s\n", debugstr_w(buf_cookie));
             while (buf_cookie[nEqualPos] != '=' && buf_cookie[nEqualPos] != '\0')
-{
+            {
                 nEqualPos++;
-}
+            }
             if (buf_cookie[nEqualPos] == '\0' || buf_cookie[nEqualPos + 1] == '\0')
-{
+            {
                 HeapFree(GetProcessHeap(), 0, buf_cookie);
-            break;
-        }
+                break;
+            }
 
             cookie_name = HeapAlloc(GetProcessHeap(), 0, (nEqualPos + 1)*sizeof(WCHAR));
             lstrcpynW(cookie_name, buf_cookie, nEqualPos + 1);
@@ -393,11 +393,11 @@ static void HTTP_ProcessCookies( LPWININETHTTPREQW lpwhr )
 }
 
 static inline BOOL is_basic_auth_value( LPCWSTR pszAuthValue )
-    {
+{
     static const WCHAR szBasic[] = {'B','a','s','i','c'}; /* Note: not nul-terminated */
     return !strncmpiW(pszAuthValue, szBasic, ARRAYSIZE(szBasic)) &&
         ((pszAuthValue[ARRAYSIZE(szBasic)] == ' ') || !pszAuthValue[ARRAYSIZE(szBasic)]);
-    }
+}
 
 static BOOL HTTP_DoAuthorization( LPWININETHTTPREQW lpwhr, LPCWSTR pszAuthValue,
                                   struct HttpAuthInfo **ppAuthInfo,
@@ -525,17 +525,17 @@ static BOOL HTTP_DoAuthorization( LPWININETHTTPREQW lpwhr, LPCWSTR pszAuthValue,
          * retrieve them if the application didn't pass us any credentials */
         if (!domain_and_username) return FALSE;
 
-            userlen = WideCharToMultiByte(CP_UTF8, 0, domain_and_username, lstrlenW(domain_and_username), NULL, 0, NULL, NULL);
-            passlen = WideCharToMultiByte(CP_UTF8, 0, password, lstrlenW(password), NULL, 0, NULL, NULL);
+        userlen = WideCharToMultiByte(CP_UTF8, 0, domain_and_username, lstrlenW(domain_and_username), NULL, 0, NULL, NULL);
+        passlen = WideCharToMultiByte(CP_UTF8, 0, password, lstrlenW(password), NULL, 0, NULL, NULL);
 
-            /* length includes a nul terminator, which will be re-used for the ':' */
-            auth_data = HeapAlloc(GetProcessHeap(), 0, userlen + 1 + passlen);
-            if (!auth_data)
-                return FALSE;
+        /* length includes a nul terminator, which will be re-used for the ':' */
+        auth_data = HeapAlloc(GetProcessHeap(), 0, userlen + 1 + passlen);
+        if (!auth_data)
+            return FALSE;
 
-            WideCharToMultiByte(CP_UTF8, 0, domain_and_username, -1, auth_data, userlen, NULL, NULL);
-            auth_data[userlen] = ':';
-            WideCharToMultiByte(CP_UTF8, 0, password, -1, &auth_data[userlen+1], passlen, NULL, NULL);
+        WideCharToMultiByte(CP_UTF8, 0, domain_and_username, -1, auth_data, userlen, NULL, NULL);
+        auth_data[userlen] = ':';
+        WideCharToMultiByte(CP_UTF8, 0, password, -1, &auth_data[userlen+1], passlen, NULL, NULL);
 
         pAuthInfo->auth_data = auth_data;
         pAuthInfo->auth_data_len = userlen + 1 + passlen;
@@ -776,7 +776,7 @@ BOOL WINAPI HttpEndRequestA(HINTERNET hRequest,
 
     ptrW = lpBuffersOutW;
     while (ptr)
-{
+    {
         if (ptr->lpvBuffer && ptr->dwBufferLength)
             ptrW->lpvBuffer = HeapAlloc(GetProcessHeap(),0,ptr->dwBufferLength);
         ptrW->dwBufferLength = ptr->dwBufferLength;
@@ -805,8 +805,8 @@ BOOL WINAPI HttpEndRequestA(HINTERNET hRequest,
             ptrW2 = ptrW->Next;
             HeapFree(GetProcessHeap(),0,ptrW);
             ptrW = ptrW2;
-                }
-                }
+        }
+    }
 
     return rc;
 }
@@ -837,7 +837,7 @@ BOOL WINAPI HttpEndRequestW(HINTERNET hRequest,
         INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
         if (lpwhr)
             WININET_Release( &lpwhr->hdr );
-        return FALSE;
+       return FALSE;
     }
 
     lpwhr->hdr.dwFlags |= dwFlags;
@@ -886,7 +886,7 @@ BOOL WINAPI HttpEndRequestW(HINTERNET hRequest,
                 rc = HTTP_HandleRedirect(lpwhr, szNewLocation);
                 if (rc)
                     rc = HTTP_HttpSendRequestW(lpwhr, NULL, 0, NULL, 0, 0, TRUE);
-    }
+            }
         }
     }
 
@@ -1017,12 +1017,12 @@ HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession,
         types = lpszAcceptTypes;
         while (*types)
         {
-                /* find out how many there are */
+            /* find out how many there are */
             if (((ULONG_PTR)*types >> 16) && **types)
-                {
-                    TRACE("accept type: %s\n", debugstr_a(*types));
-                    acceptTypesCount++;
-                }
+            {
+                TRACE("accept type: %s\n", debugstr_a(*types));
+                acceptTypesCount++;
+            }
             types++;
         }
         szAcceptTypes = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR *) * (acceptTypesCount+1));
@@ -1372,7 +1372,7 @@ static void HTTPREQ_Destroy(WININETHANDLEHEADER *hdr)
 
     if(lpwhr->lpszCacheFile) {
         DeleteFileW(lpwhr->lpszCacheFile); /* FIXME */
-    HeapFree(GetProcessHeap(), 0, lpwhr->lpszCacheFile);
+        HeapFree(GetProcessHeap(), 0, lpwhr->lpszCacheFile);
     }
 
     WININET_Release(&lpwhr->lpHttpSession->hdr);
@@ -1403,7 +1403,7 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
         return;
 
     if (lpwhr->pAuthInfo)
-{
+    {
         if (SecIsValidHandle(&lpwhr->pAuthInfo->ctx))
             DeleteSecurityContext(&lpwhr->pAuthInfo->ctx);
         if (SecIsValidHandle(&lpwhr->pAuthInfo->cred))
@@ -1413,9 +1413,9 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
         HeapFree(GetProcessHeap(), 0, lpwhr->pAuthInfo->scheme);
         HeapFree(GetProcessHeap(), 0, lpwhr->pAuthInfo);
         lpwhr->pAuthInfo = NULL;
-}
+    }
     if (lpwhr->pProxyAuthInfo)
-{
+    {
         if (SecIsValidHandle(&lpwhr->pProxyAuthInfo->ctx))
             DeleteSecurityContext(&lpwhr->pProxyAuthInfo->ctx);
         if (SecIsValidHandle(&lpwhr->pProxyAuthInfo->cred))
@@ -1434,10 +1434,10 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
 
     INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
                           INTERNET_STATUS_CONNECTION_CLOSED, 0, 0);
-    }
+}
 
 static DWORD HTTPREQ_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
-    {
+{
     WININETHTTPREQW *req = (WININETHTTPREQW*)hdr;
 
     switch(option) {
@@ -1616,7 +1616,7 @@ static DWORD HTTP_Read(WININETHTTPREQW *req, void *buffer, DWORD size, DWORD *re
         *read = 0;
         HTTP_FinishedReading(req);
         return ERROR_SUCCESS;
-}
+    }
 
     req->dwContentRead += bytes_read;
     *read = bytes_read;
@@ -1628,26 +1628,26 @@ static DWORD HTTP_Read(WININETHTTPREQW *req, void *buffer, DWORD size, DWORD *re
         res = WriteFile(req->hCacheFile, buffer, bytes_read, &dwBytesWritten, NULL);
         if(!res)
             WARN("WriteFile failed: %u\n", GetLastError());
-        }
+    }
 
     if(!bytes_read && (req->dwContentRead == req->dwContentLength))
         HTTP_FinishedReading(req);
 
     return ERROR_SUCCESS;
-        }
+}
 
 static DWORD get_chunk_size(const char *buffer)
-    {
+{
     const char *p;
     DWORD size = 0;
 
     for (p = buffer; *p; p++)
-{
+    {
         if (*p >= '0' && *p <= '9') size = size * 16 + *p - '0';
         else if (*p >= 'a' && *p <= 'f') size = size * 16 + *p - 'a' + 10;
         else if (*p >= 'A' && *p <= 'F') size = size * 16 + *p - 'A' + 10;
         else if (*p == ';') break;
-        }
+    }
     return size;
 }
 
@@ -1663,27 +1663,27 @@ static DWORD HTTP_ReadChunked(WININETHTTPREQW *req, void *buffer, DWORD size, DW
         if (*read == size) break;
 
         if (req->dwContentLength == ~0UL) /* new chunk */
-{
+        {
             buflen = sizeof(reply);
             if (!NETCON_getNextLine(&req->netConnection, reply, &buflen)) break;
 
             if (!(req->dwContentLength = get_chunk_size(reply)))
-{
+            {
                 /* zero sized chunk marks end of transfer; read any trailing headers and return */
                 HTTP_GetResponseHeaders(req, FALSE);
                 break;
-    }
-}
+            }
+        }
         to_read = min(to_write, req->dwContentLength - req->dwContentRead);
 
         if (!NETCON_recv(&req->netConnection, p, to_read, sync ? MSG_WAITALL : 0, &bytes_read))
-{
+        {
             if (bytes_read != to_read)
                 ERR("Not all data received %d/%d\n", bytes_read, to_read);
 
             /* always return success, even if the network layer returns an error */
             *read = 0;
-                break;
+            break;
         }
         if (!bytes_read) break;
 
@@ -1692,12 +1692,12 @@ static DWORD HTTP_ReadChunked(WININETHTTPREQW *req, void *buffer, DWORD size, DW
         *read += bytes_read;
 
         if (req->lpszCacheFile)
-{
+        {
             DWORD dwBytesWritten;
 
             if (!WriteFile(req->hCacheFile, p, bytes_read, &dwBytesWritten, NULL))
                 WARN("WriteFile failed: %u\n", GetLastError());
-    }
+        }
         p += bytes_read;
 
         if (req->dwContentRead == req->dwContentLength) /* chunk complete */
@@ -1707,12 +1707,12 @@ static DWORD HTTP_ReadChunked(WININETHTTPREQW *req, void *buffer, DWORD size, DW
 
             buflen = sizeof(reply);
             if (!NETCON_getNextLine(&req->netConnection, reply, &buflen))
-{
+            {
                 ERR("Malformed chunk\n");
                 *read = 0;
                 break;
-    }
-}
+            }
+        }
     }
     if (!*read) HTTP_FinishedReading(req);
     return ERROR_SUCCESS;
@@ -1731,7 +1731,7 @@ static DWORD HTTPREQ_Read(WININETHTTPREQW *req, void *buffer, DWORD size, DWORD
     }
     else
         return HTTP_Read(req, buffer, size, read, sync);
-        }
+}
 
 static DWORD HTTPREQ_ReadFile(WININETHANDLEHEADER *hdr, void *buffer, DWORD size, DWORD *read)
 {
@@ -1779,17 +1779,17 @@ static DWORD HTTPREQ_ReadFileExA(WININETHANDLEHEADER *hdr, INTERNET_BUFFERSA *bu
 
         NETCON_query_data_available(&req->netConnection, &available);
         if (!available)
-    {
-        WORKREQUEST workRequest;
+        {
+            WORKREQUEST workRequest;
 
             workRequest.asyncproc = HTTPREQ_AsyncReadFileExProc;
-        workRequest.hdr = WININET_AddRef(&req->hdr);
-        workRequest.u.InternetReadFileExA.lpBuffersOut = buffers;
+            workRequest.hdr = WININET_AddRef(&req->hdr);
+            workRequest.u.InternetReadFileExA.lpBuffersOut = buffers;
 
-        INTERNET_AsyncCall(&workRequest);
+            INTERNET_AsyncCall(&workRequest);
 
-        return ERROR_IO_PENDING;
-    }
+            return ERROR_IO_PENDING;
+        }
     }
 
     res = HTTPREQ_Read(req, buffers->lpvBuffer, buffers->dwBufferLength, &buffers->dwBufferLength,
@@ -1825,7 +1825,7 @@ static void HTTPREQ_AsyncQueryDataAvailableProc(WORKREQUEST *workRequest)
 
     INTERNET_SendCallback(&req->hdr, req->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, &iar,
                           sizeof(INTERNET_ASYNC_RESULT));
-            }
+}
 
 static DWORD HTTPREQ_QueryDataAvailable(WININETHANDLEHEADER *hdr, DWORD *available, DWORD flags, DWORD_PTR ctx)
 {
@@ -1846,7 +1846,7 @@ static DWORD HTTPREQ_QueryDataAvailable(WININETHANDLEHEADER *hdr, DWORD *availab
     if (NETCON_recv(&req->netConnection, buffer,
                     min(async ? 1 : sizeof(buffer), req->dwContentLength - req->dwContentRead),
                     MSG_PEEK, (int *)available) && async && *available)
-{
+    {
         WORKREQUEST workRequest;
 
         *available = 0;
@@ -2233,13 +2233,13 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev
                 return FALSE;
             }
 
-                for (i = 0; ppszRawHeaderLines[i]; i++)
-                {
-                    DWORD len = strlenW(ppszRawHeaderLines[i]);
-                    memcpy(pszString, ppszRawHeaderLines[i], (len+1)*sizeof(WCHAR));
-                    pszString += len+1;
-                }
-                *pszString = '\0';
+            for (i = 0; ppszRawHeaderLines[i]; i++)
+            {
+                DWORD len = strlenW(ppszRawHeaderLines[i]);
+                memcpy(pszString, ppszRawHeaderLines[i], (len+1)*sizeof(WCHAR));
+                pszString += len+1;
+            }
+            *pszString = '\0';
 
             TRACE("returning data: %s\n", debugstr_wn((WCHAR*)lpBuffer, size));
 
@@ -2258,7 +2258,7 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev
                 INTERNET_SetLastError(ERROR_INSUFFICIENT_BUFFER);
                 return FALSE;
             }
-                memcpy(lpBuffer, lpwhr->lpszStatusText, (len + 1) * sizeof(WCHAR));
+            memcpy(lpBuffer, lpwhr->lpszStatusText, (len+1)*sizeof(WCHAR));
             *lpdwBufferLength = len * sizeof(WCHAR);
 
             TRACE("returning data: %s\n", debugstr_wn((WCHAR*)lpBuffer, len));
@@ -2276,7 +2276,7 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev
                 INTERNET_SetLastError(ERROR_INSUFFICIENT_BUFFER);
                 return FALSE;
             }
-                memcpy(lpBuffer, lpwhr->lpszVersion, (len + 1) * sizeof(WCHAR));
+            memcpy(lpBuffer, lpwhr->lpszVersion, (len+1)*sizeof(WCHAR));
             *lpdwBufferLength = len * sizeof(WCHAR);
 
             TRACE("returning data: %s\n", debugstr_wn((WCHAR*)lpBuffer, len));
@@ -2310,8 +2310,8 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev
     /* coalesce value to requested type */
     if (dwInfoLevel & HTTP_QUERY_FLAG_NUMBER)
     {
-        *(int *)lpBuffer = atoiW(lphttpHdr->lpszValue);
-        bSuccess = TRUE;
+       *(int *)lpBuffer = atoiW(lphttpHdr->lpszValue);
+       bSuccess = TRUE;
 
        TRACE(" returning number : %d\n", *(int *)lpBuffer);
     }
@@ -2324,24 +2324,24 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev
         tmpTime = ConvertTimeString(lphttpHdr->lpszValue);
 
         tmpTM = *gmtime(&tmpTime);
-        STHook = (SYSTEMTIME *)lpBuffer;
+        STHook = (SYSTEMTIME *) lpBuffer;
         if(STHook==NULL)
             return bSuccess;
 
-        STHook->wDay = tmpTM.tm_mday;
-        STHook->wHour = tmpTM.tm_hour;
-        STHook->wMilliseconds = 0;
-        STHook->wMinute = tmpTM.tm_min;
-        STHook->wDayOfWeek = tmpTM.tm_wday;
-        STHook->wMonth = tmpTM.tm_mon + 1;
-        STHook->wSecond = tmpTM.tm_sec;
-        STHook->wYear = tmpTM.tm_year;
+       STHook->wDay = tmpTM.tm_mday;
+       STHook->wHour = tmpTM.tm_hour;
+       STHook->wMilliseconds = 0;
+       STHook->wMinute = tmpTM.tm_min;
+       STHook->wDayOfWeek = tmpTM.tm_wday;
+       STHook->wMonth = tmpTM.tm_mon + 1;
+       STHook->wSecond = tmpTM.tm_sec;
+       STHook->wYear = tmpTM.tm_year;
        
-        bSuccess = TRUE;
+       bSuccess = TRUE;
        
-        TRACE(" returning time: %04d/%02d/%02d - %d - %02d:%02d:%02d.%02d\n",
-              STHook->wYear, STHook->wMonth, STHook->wDay, STHook->wDayOfWeek,
-              STHook->wHour, STHook->wMinute, STHook->wSecond, STHook->wMilliseconds);
+       TRACE(" returning time : %04d/%02d/%02d - %d - %02d:%02d:%02d.%02d\n", 
+             STHook->wYear, STHook->wMonth, STHook->wDay, STHook->wDayOfWeek,
+             STHook->wHour, STHook->wMinute, STHook->wSecond, STHook->wMilliseconds);
     }
     else if (lphttpHdr->lpszValue)
     {
@@ -2354,7 +2354,7 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev
             return bSuccess;
         }
 
-            memcpy(lpBuffer, lphttpHdr->lpszValue, len);
+        memcpy(lpBuffer, lphttpHdr->lpszValue, len);
         *lpdwBufferLength = len - sizeof(WCHAR);
         bSuccess = TRUE;
 
@@ -2679,7 +2679,7 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
         if (lpBuffersIn)
         {
             if (lpBuffersIn->lpcszHeader)
-            /* FIXME: this should use dwHeadersLength or may not be necessary at all */
+                /* FIXME: this should use dwHeadersLength or may not be necessary at all */
                 req->lpszHeader = WININET_strdupW(lpBuffersIn->lpcszHeader);
             else
                 req->lpszHeader = NULL;
@@ -2871,57 +2871,57 @@ static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl)
     {
         URL_COMPONENTSW urlComponents;
         WCHAR protocol[32], hostName[MAXHOSTNAME], userName[1024];
-    static WCHAR szHttp[] = {'h','t','t','p',0};
-    static WCHAR szHttps[] = {'h','t','t','p','s',0};
-    DWORD url_length = 0;
-    LPWSTR orig_url;
-    LPWSTR combined_url;
-
-    urlComponents.dwStructSize = sizeof(URL_COMPONENTSW);
-    urlComponents.lpszScheme = (lpwhr->hdr.dwFlags & INTERNET_FLAG_SECURE) ? szHttps : szHttp;
-    urlComponents.dwSchemeLength = 0;
-    urlComponents.lpszHostName = lpwhs->lpszHostName;
-    urlComponents.dwHostNameLength = 0;
-    urlComponents.nPort = lpwhs->nHostPort;
-    urlComponents.lpszUserName = lpwhs->lpszUserName;
-    urlComponents.dwUserNameLength = 0;
-    urlComponents.lpszPassword = NULL;
-    urlComponents.dwPasswordLength = 0;
-    urlComponents.lpszUrlPath = lpwhr->lpszPath;
-    urlComponents.dwUrlPathLength = 0;
-    urlComponents.lpszExtraInfo = NULL;
-    urlComponents.dwExtraInfoLength = 0;
-
-    if (!InternetCreateUrlW(&urlComponents, 0, NULL, &url_length) &&
-        (GetLastError() != ERROR_INSUFFICIENT_BUFFER))
+        static WCHAR szHttp[] = {'h','t','t','p',0};
+        static WCHAR szHttps[] = {'h','t','t','p','s',0};
+        DWORD url_length = 0;
+        LPWSTR orig_url;
+        LPWSTR combined_url;
+
+        urlComponents.dwStructSize = sizeof(URL_COMPONENTSW);
+        urlComponents.lpszScheme = (lpwhr->hdr.dwFlags & INTERNET_FLAG_SECURE) ? szHttps : szHttp;
+        urlComponents.dwSchemeLength = 0;
+        urlComponents.lpszHostName = lpwhs->lpszHostName;
+        urlComponents.dwHostNameLength = 0;
+        urlComponents.nPort = lpwhs->nHostPort;
+        urlComponents.lpszUserName = lpwhs->lpszUserName;
+        urlComponents.dwUserNameLength = 0;
+        urlComponents.lpszPassword = NULL;
+        urlComponents.dwPasswordLength = 0;
+        urlComponents.lpszUrlPath = lpwhr->lpszPath;
+        urlComponents.dwUrlPathLength = 0;
+        urlComponents.lpszExtraInfo = NULL;
+        urlComponents.dwExtraInfoLength = 0;
+
+        if (!InternetCreateUrlW(&urlComponents, 0, NULL, &url_length) &&
+            (GetLastError() != ERROR_INSUFFICIENT_BUFFER))
             return FALSE;
 
-    orig_url = HeapAlloc(GetProcessHeap(), 0, url_length);
+        orig_url = HeapAlloc(GetProcessHeap(), 0, url_length);
 
-    /* convert from bytes to characters */
-    url_length = url_length / sizeof(WCHAR) - 1;
-    if (!InternetCreateUrlW(&urlComponents, 0, orig_url, &url_length))
-    {
-        HeapFree(GetProcessHeap(), 0, orig_url);
+        /* convert from bytes to characters */
+        url_length = url_length / sizeof(WCHAR) - 1;
+        if (!InternetCreateUrlW(&urlComponents, 0, orig_url, &url_length))
+        {
+            HeapFree(GetProcessHeap(), 0, orig_url);
             return FALSE;
-    }
+        }
 
-    url_length = 0;
-    if (!InternetCombineUrlW(orig_url, lpszUrl, NULL, &url_length, ICU_ENCODE_SPACES_ONLY) &&
-        (GetLastError() != ERROR_INSUFFICIENT_BUFFER))
-    {
-        HeapFree(GetProcessHeap(), 0, orig_url);
+        url_length = 0;
+        if (!InternetCombineUrlW(orig_url, lpszUrl, NULL, &url_length, ICU_ENCODE_SPACES_ONLY) &&
+            (GetLastError() != ERROR_INSUFFICIENT_BUFFER))
+        {
+            HeapFree(GetProcessHeap(), 0, orig_url);
             return FALSE;
-    }
-    combined_url = HeapAlloc(GetProcessHeap(), 0, url_length * sizeof(WCHAR));
+        }
+        combined_url = HeapAlloc(GetProcessHeap(), 0, url_length * sizeof(WCHAR));
 
-    if (!InternetCombineUrlW(orig_url, lpszUrl, combined_url, &url_length, ICU_ENCODE_SPACES_ONLY))
-    {
-        HeapFree(GetProcessHeap(), 0, orig_url);
-        HeapFree(GetProcessHeap(), 0, combined_url);
+        if (!InternetCombineUrlW(orig_url, lpszUrl, combined_url, &url_length, ICU_ENCODE_SPACES_ONLY))
+        {
+            HeapFree(GetProcessHeap(), 0, orig_url);
+            HeapFree(GetProcessHeap(), 0, combined_url);
             return FALSE;
-    }
-    HeapFree(GetProcessHeap(), 0, orig_url);
+        }
+        HeapFree(GetProcessHeap(), 0, orig_url);
 
         userName[0] = 0;
         hostName[0] = 0;
@@ -3349,13 +3349,13 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
                                           INTERNET_STATUS_REDIRECT, szNewLocation,
                                           dwBufferSize);
                     bSuccess = HTTP_HandleRedirect(lpwhr, szNewLocation);
-                        if (bSuccess)
-                        {
-                            HeapFree(GetProcessHeap(), 0, requestString);
-                            loop_next = TRUE;
-                        }
+                    if (bSuccess)
+                    {
+                        HeapFree(GetProcessHeap(), 0, requestString);
+                        loop_next = TRUE;
                     }
                 }
+            }
             if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_AUTH) && bSuccess)
             {
                 WCHAR szAuthValue[2048];
@@ -3429,12 +3429,12 @@ lend:
 
     /* TODO: send notification for P3P header */
 
-                iar.dwResult = (DWORD_PTR)lpwhr->hdr.hInternet;
+    iar.dwResult = (DWORD_PTR)lpwhr->hdr.hInternet;
     iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError();
 
-                INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
-                                  INTERNET_STATUS_REQUEST_COMPLETE, &iar,
-                                  sizeof(INTERNET_ASYNC_RESULT));
+    INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
+                          INTERNET_STATUS_REQUEST_COMPLETE, &iar,
+                          sizeof(INTERNET_ASYNC_RESULT));
 
     TRACE("<--\n");
     if (bSuccess) INTERNET_SetLastError(ERROR_SUCCESS);
@@ -3745,20 +3745,20 @@ static INT HTTP_GetResponseHeaders(LPWININETHTTPREQW lpwhr, BOOL clear)
             goto lend;
         MultiByteToWideChar( CP_ACP, 0, bufferA, buflen, buffer, MAX_REPLY_LEN );
 
-            /* split the version from the status code */
-            status_code = strchrW( buffer, ' ' );
-            if( !status_code )
-                goto lend;
-            *status_code++=0;
+        /* split the version from the status code */
+        status_code = strchrW( buffer, ' ' );
+        if( !status_code )
+            goto lend;
+        *status_code++=0;
 
-            /* split the status code from the status text */
-            status_text = strchrW( status_code, ' ' );
-            if( !status_text )
-                goto lend;
-            *status_text++=0;
+        /* split the status code from the status text */
+        status_text = strchrW( status_code, ' ' );
+        if( !status_text )
+            goto lend;
+        *status_text++=0;
 
-            TRACE("version [%s] status code [%s] status text [%s]\n",
-               debugstr_w(buffer), debugstr_w(status_code), debugstr_w(status_text) );
+        TRACE("version [%s] status code [%s] status text [%s]\n",
+           debugstr_w(buffer), debugstr_w(status_code), debugstr_w(status_text) );
 
     } while (!strcmpW(status_code, szHundred)); /* ignore "100 Continue" responses */
 
@@ -3799,26 +3799,26 @@ static INT HTTP_GetResponseHeaders(LPWININETHTTPREQW lpwhr, BOOL clear)
             TRACE("got line %s, now interpreting\n", debugstr_a(bufferA));
             MultiByteToWideChar( CP_ACP, 0, bufferA, buflen, buffer, MAX_REPLY_LEN );
 
-                while (cchRawHeaders + buflen + strlenW(szCrLf) > cchMaxRawHeaders)
+            while (cchRawHeaders + buflen + strlenW(szCrLf) > cchMaxRawHeaders)
             {
-                    cchMaxRawHeaders *= 2;
+                cchMaxRawHeaders *= 2;
                 lpszRawHeaders = HeapReAlloc(GetProcessHeap(), 0, lpszRawHeaders, (cchMaxRawHeaders+1)*sizeof(WCHAR));
             }
-                memcpy(lpszRawHeaders+cchRawHeaders, buffer, (buflen-1)*sizeof(WCHAR));
-                cchRawHeaders += (buflen-1);
-                memcpy(lpszRawHeaders+cchRawHeaders, szCrLf, sizeof(szCrLf));
-                cchRawHeaders += sizeof(szCrLf)/sizeof(szCrLf[0])-1;
-                lpszRawHeaders[cchRawHeaders] = '\0';
+            memcpy(lpszRawHeaders+cchRawHeaders, buffer, (buflen-1)*sizeof(WCHAR));
+            cchRawHeaders += (buflen-1);
+            memcpy(lpszRawHeaders+cchRawHeaders, szCrLf, sizeof(szCrLf));
+            cchRawHeaders += sizeof(szCrLf)/sizeof(szCrLf[0])-1;
+            lpszRawHeaders[cchRawHeaders] = '\0';
 
             pFieldAndValue = HTTP_InterpretHttpHeader(buffer);
             if (!pFieldAndValue)
                 break;
 
-                HTTP_ProcessHeader(lpwhr, pFieldAndValue[0], pFieldAndValue[1],
-                                   HTTP_ADDREQ_FLAG_ADD );
+            HTTP_ProcessHeader(lpwhr, pFieldAndValue[0], pFieldAndValue[1], 
+                HTTP_ADDREQ_FLAG_ADD );
 
-                HTTP_FreeTokens(pFieldAndValue);
-            }
+            HTTP_FreeTokens(pFieldAndValue);
+       }
        else
        {
            cbreaks++;
index 05def9b..bad795d 100644 (file)
@@ -460,7 +460,7 @@ static void dump_INTERNET_FLAGS(DWORD dwFlags)
     };
 #undef FE
     int i;
-
+    
     for (i = 0; i < (sizeof(flag) / sizeof(flag[0])); i++) {
        if (flag[i].val & dwFlags) {
            TRACE(" %s", flag[i].name);
@@ -520,13 +520,13 @@ static DWORD APPINFO_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b
             if(!buffer || bufsize < *size)
                 return ERROR_INSUFFICIENT_BUFFER;
 
-                strcpyW(buffer, ai->lpszAgent);
+            strcpyW(buffer, ai->lpszAgent);
         }else {
-                *size = WideCharToMultiByte(CP_ACP, 0, ai->lpszAgent, -1, NULL, 0, NULL, NULL);
+            *size = WideCharToMultiByte(CP_ACP, 0, ai->lpszAgent, -1, NULL, 0, NULL, NULL);
             if(!buffer || bufsize < *size)
                 return ERROR_INSUFFICIENT_BUFFER;
 
-                WideCharToMultiByte(CP_ACP, 0, ai->lpszAgent, -1, buffer, *size, NULL, NULL);
+            WideCharToMultiByte(CP_ACP, 0, ai->lpszAgent, -1, buffer, *size, NULL, NULL);
         }
 
         return ERROR_SUCCESS;
@@ -543,7 +543,7 @@ static DWORD APPINFO_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b
             if (ai->lpszProxyBypass)
                 proxyBypassBytesRequired = (lstrlenW(ai->lpszProxyBypass) + 1) * sizeof(WCHAR);
             if (*size < sizeof(INTERNET_PROXY_INFOW) + proxyBytesRequired + proxyBypassBytesRequired)
-                return ERROR_INSUFFICIENT_BUFFER;
+                    return ERROR_INSUFFICIENT_BUFFER;
 
             proxy = (LPWSTR)((LPBYTE)buffer + sizeof(INTERNET_PROXY_INFOW));
             proxy_bypass = (LPWSTR)((LPBYTE)buffer + sizeof(INTERNET_PROXY_INFOW) + proxyBytesRequired);
@@ -1814,7 +1814,7 @@ INTERNET_STATUS_CALLBACK WINAPI InternetSetStatusCallbackA(
     LPWININETHANDLEHEADER lpwh;
 
     TRACE("0x%08x\n", (ULONG)hInternet);
-
+    
     if (!(lpwh = WININET_GetObject(hInternet)))
         return INTERNET_INVALID_STATUS_CALLBACK;
 
@@ -2016,8 +2016,8 @@ BOOL WINAPI InternetReadFileExW(HINTERNET hFile, LPINTERNET_BUFFERSW lpBuffer,
   ERR("(%p, %p, 0x%x, 0x%lx): not implemented in native\n", hFile, lpBuffer, dwFlags, dwContext);
 
   INTERNET_SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-        return FALSE;
-    }
+  return FALSE;
+}
 
 DWORD INET_QueryOption(DWORD option, void *buffer, DWORD *size, BOOL unicode)
 {
@@ -2047,7 +2047,7 @@ DWORD INET_QueryOption(DWORD option, void *buffer, DWORD *size, BOOL unicode)
         return ERROR_SUCCESS;
 
     case INTERNET_OPTION_CONNECTED_STATE:
-            FIXME("INTERNET_OPTION_CONNECTED_STATE: semi-stub\n");
+        FIXME("INTERNET_OPTION_CONNECTED_STATE: semi-stub\n");
 
         if (*size < sizeof(ULONG))
             return ERROR_INSUFFICIENT_BUFFER;
@@ -2259,7 +2259,7 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption,
         INTERNET_STATUS_CALLBACK callback = *(INTERNET_STATUS_CALLBACK *)lpBuffer;
         ret = (set_status_callback(lpwhh, callback, TRUE) != INTERNET_INVALID_STATUS_CALLBACK);
         break;
-        }
+      }
     case INTERNET_OPTION_HTTP_VERSION:
       {
         HTTP_VERSION_INFO* pVersion=(HTTP_VERSION_INFO*)lpBuffer;
@@ -2737,11 +2737,11 @@ BOOL WINAPI InternetCheckConnectionA(LPCSTR lpszUrl, DWORD dwFlags, DWORD dwRese
 
     len = MultiByteToWideChar(CP_ACP, 0, lpszUrl, -1, NULL, 0);
     if (!(szUrl = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR))))
-            return FALSE;
+        return FALSE;
     MultiByteToWideChar(CP_ACP, 0, lpszUrl, -1, szUrl, len);
     rc = InternetCheckConnectionW(szUrl, dwFlags, dwReserved);
     HeapFree(GetProcessHeap(), 0, szUrl);
-
+    
     return rc;
 }
 
@@ -2905,7 +2905,7 @@ HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl,
 
        workRequest.asyncproc = AsyncInternetOpenUrlProc;
        workRequest.hdr = WININET_AddRef( &hIC->hdr );
-        req = &workRequest.u.InternetOpenUrlW;
+       req = &workRequest.u.InternetOpenUrlW;
        req->lpszUrl = WININET_strdupW(lpszUrl);
        if (lpszHeaders)
            req->lpszHeaders = WININET_strdupW(lpszHeaders);
index effe483..0dcf5a2 100644 (file)
@@ -78,8 +78,8 @@ static inline LPWSTR WININET_strdup_AtoW( LPCSTR str )
 {
     int len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0);
     LPWSTR ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
-        if(ret)
-            MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
+    if (ret)
+        MultiByteToWideChar( CP_ACP, 0, str, -1, ret, len);
     return ret;
 }
 
@@ -87,7 +87,7 @@ static inline LPSTR WININET_strdup_WtoA( LPCWSTR str )
 {
     int len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
     LPSTR ret = HeapAlloc( GetProcessHeap(), 0, len );
-        if(ret)
+    if (ret)
         WideCharToMultiByte( CP_ACP, 0, str, -1, ret, len, NULL, NULL);
     return ret;
 }
@@ -339,7 +339,7 @@ typedef struct WORKREQ
         struct WORKREQ_FTPFINDNEXTW             FtpFindNextW;
         struct WORKREQ_HTTPSENDREQUESTW         HttpSendRequestW;
         struct WORKREQ_SENDCALLBACK             SendCallback;
-        struct WORKREQ_INTERNETOPENURLW         InternetOpenUrlW;
+       struct WORKREQ_INTERNETOPENURLW         InternetOpenUrlW;
         struct WORKREQ_INTERNETREADFILEEXA      InternetReadFileExA;
     } u;
 
index 9d331fd..5d8b4d7 100644 (file)
@@ -621,7 +621,7 @@ BOOL NETCON_query_data_available(WININET_NETCONNECTION *connection, DWORD *avail
     }
 #endif
     return TRUE;
-    }
+}
 
 /******************************************************************************
  * NETCON_getNextLine
@@ -663,8 +663,8 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
                if (lpszBuffer[nRecv] != '\r')
                    nRecv++;
            }
-    else
-    {
+           else
+           {
                INTERNET_SetLastError(ERROR_INTERNET_TIMEOUT);
                goto lend;
            }
@@ -700,7 +700,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
            {
                 INTERNET_SetLastError(ERROR_CONNECTION_ABORTED);
                success = FALSE;
-    }
+           }
 
            if (lpszBuffer[nRecv] == '\n')
            {
@@ -717,8 +717,8 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
            lpszBuffer[nRecv++] = '\0';
            *dwBuffer = nRecv;
            TRACE("_SSL:%u %s\n", nRecv, lpszBuffer);
-    return TRUE;
-}
+            return TRUE;
+       }
         return FALSE;
 #else
        return FALSE;
index d7bc27b..c839419 100644 (file)
@@ -617,8 +617,8 @@ static DWORD URLCacheContainers_FindContainerA(LPCSTR lpszUrl, URLCACHECONTAINER
         MultiByteToWideChar(CP_ACP, 0, lpszUrl, -1, lpwszUrl, url_len);
         ret = URLCacheContainers_FindContainerW(lpwszUrl, ppContainer);
         HeapFree(GetProcessHeap(), 0, lpwszUrl);
-    return ret;
-}
+        return ret;
+    }
     return GetLastError();
 }
 
@@ -2462,9 +2462,9 @@ static BOOL CommitUrlCacheEntryInternal(
         lpszFileExtensionA = HeapAlloc(GetProcessHeap(), 0, len * sizeof(char));
         if (!lpszFileExtensionA)
         {
-        error = GetLastError();
-        goto cleanup;
-    }
+            error = GetLastError();
+            goto cleanup;
+        }
         WideCharToMultiByte(CP_ACP, 0, lpszFileExtension, -1, lpszFileExtensionA, len, NULL, NULL);
     }
 
@@ -3626,8 +3626,8 @@ BOOL WINAPI IsUrlCacheEntryExpiredW( LPCWSTR url, DWORD dwFlags, FILETIME* pftLa
 BOOL WINAPI GetDiskInfoA(PCSTR p0, PDWORD p1, PDWORDLONG p2, PDWORDLONG p3)
 {
     FIXME("(%p, %p, %p, %p)\n", p0, p1, p2, p3);
-        return FALSE;
-    }
+    return FALSE;
+}
 
 /***********************************************************************
  *           RegisterUrlCacheNotification (WININET.@)